Article View: news.software.readers
Article #71527Re: [slrn] tab compleation of filenames
From: Faux_Pseudo
Date: Sat, 03 Feb 2001 09:26
Date: Sat, 03 Feb 2001 09:26
68 lines
3967 bytes
3967 bytes
well its defanetly a start. if some c/slang people can come in and clean up the errors (espescialy the overflows) it could do the trick one thing i was thinking about with the file name being longer than the number of chars your console can suport. basicly build a new window like the header and body pains start the window at 1 line for the seperation of it and what ever pain (header/body) is at the bottem of the term and one line for the file name in question. then word wrap it with the following format (header or body window pain) | #News Group: alt.ascii-art | Save to file (^G aborts): | /home/faux/code/c/samples/ |<-end of term length <tab> interesting/ideas/number5.c | ####################################| normal subject/body window(s) -1 for each line of wrap. after you have it and hit enter to confirm the program could shut down the new windowpain and execute a ^L to put everything back where it belongs. this would also help with feeding a list of possable matches as well. the short falls of this idea is that it could involv a total overhall of the code to creat a 3rd window. and i have no idea how to emplament this. --(Once apon a time, in news.software.readers,)-- --(Jurriaan said it like only they can.)-- >the simple setup: > >take the current input buffer. >split in dir/ and filename part >open dir, read all files >if we find one that matches the filename-part, insert that into the >buffer. > >and of course, some state is saved, so you can walk through all the >files in the directory by pressing tab. If you select a file that's >actually a directory, nothing happens. Several microseconds later, slrn >tells you it's unable to open that file :-) > >The full buffer is taken into account, not everything upto and including >the cursor position. > >I have tested regexp matching, but cannot imagine the benefits of that >really; it wouldn't be tab-completion anymore.... > >Here is the main part of the code, it's rather unpolished, I'm not sure >about the large number of static char[]'s, I work on a terminal with a >line-width of 133 characters, so the lines are too long and there are >probably all sorts of nasty overflows hidden. If you have to ask how to >include this in your slrn, it won't work. Please wait for the final >thing. > -- --(UIN=66618055)-- --(tty1@faux.local_04:45_/home/faux)-- cat .sig GUI's are for slackers. ibpconf.sh 6 on freshmeat.net The easiest way to customize the command line. By Faux_Pseudo
Technical Details
Message-ID:
<Y8Qe6.25818$E6.739221@news1.rdc1.sdca.home.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!4.1.16.34!cpk-news-hub1.bbnplanet.com!news.gtei.net!newshub2.home.com!news.home.com!news1.rdc1.sdca.home.com.POSTED!not-for-mailReferences:
<d1wd6.14046$E6.544876@news1.rdc1.sdca.home.com> <slrn97e5p3.q5.tststs@starflower.tststs.ddns.org> <slrn97fa6s.3v6._hate_spam_thunder7@middle.of.nowhere> <slrn97gm2t.b8.tststs@starflower.tststs.ddns.org> <slrn97ikqu.2g0._hate_spam_thunder7@middle.of.nowhere> <slrn97jfmp.1jn.tststs@starflower.tststs.ddns.org> <slrn97m95q.ke1._hate_spam_thunder7@middle.of.nowhere>Show Full Headers
Complete Article Headers
Message-ID: <Y8Qe6.25818$E6.739221@news1.rdc1.sdca.home.com> Subject: Re: [slrn] tab compleation of filenames Date: Sat, 03 Feb 2001 09:26:16 GMT From: Faux_Pseudo@home.com (Faux_Pseudo) References: <d1wd6.14046$E6.544876@news1.rdc1.sdca.home.com> <slrn97e5p3.q5.tststs@starflower.tststs.ddns.org> <slrn97fa6s.3v6._hate_spam_thunder7@middle.of.nowhere> <slrn97gm2t.b8.tststs@starflower.tststs.ddns.org> <slrn97ikqu.2g0._hate_spam_thunder7@middle.of.nowhere> <slrn97jfmp.1jn.tststs@starflower.tststs.ddns.org> <slrn97m95q.ke1._hate_spam_thunder7@middle.of.nowhere> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!4.1.16.34!cpk-news-hub1.bbnplanet.com!news.gtei.net!newshub2.home.com!news.home.com!news1.rdc1.sdca.home.com.POSTED!not-for-mail Newsgroups: news.software.readers Reply-To: Faux_Pseudo@yahoo.com User-Agent: slrn/0.9.6.3 (Linux) Lines: 67 NNTP-Posting-Host: 24.177.56.10 X-Complaints-To: abuse@home.net X-Trace: news1.rdc1.sdca.home.com 981192376 24.177.56.10 (Sat, 03 Feb 2001 01:26:16 PST) NNTP-Posting-Date: Sat, 03 Feb 2001 01:26:16 PST Organization: Excite@Home - The Leader in Broadband http://home.com/faster