Re: Completing the command line using 'all' as the option to command.complete

On Fri, 01 Aug 2008 13:20:45 -0500
Adam Krolnik <adam.krolnik@xxxxxxxxxxxxxxx> wrote:

> Here's what I was doing...
> 
> sh>ls -lt | head  (32747)
> stty: standard input: Invalid argument
> total 41168
> -rw-rw-r-- 1 krolnik zsp    12268 Aug  1 13:13 Misc_hw_stuff.ods
> -rw-rw-r-- 1 krolnik zsp     2107 Jul 31 17:26 x2z_full.txt
> -rw-rw-r-- 1 krolnik zsp   119808 Jul 31 11:41 sdram_newconfig.xls
> -rw-rw-r-- 1 krolnik zsp      367 Jul 30 15:27 craigslist.search
> -rw-rw-r-- 1 krolnik zsp    10481 Jul 29 17:03 zsim520_sdram.resource
> 
> 
> With complete "files"
> 
> %  ls x2z<tab>            -- Will complete the filename as x2z_full.txt
> 
> With complete "all"
> 
> %  ls x2z<tab>            -- Will complete the filename as x2z_full.txt
> 
> Here's the difference.
> 
> With complete "files" and  starting in one directory up.
> 
> % ls doc/x2z<tab>         -- Will complete the filename as doc/x2z_full.txt
> 
> With complete "all" and starting in one directory up.
> 
> % ls doc/x2z<tab>         -- No completion being done.
> 
> It would be good if this could work as tcsh and complete the filename, 
> path included.

I've removed the termination after first match-type, so that 'all' now works 
(for command arguments) as the user would probably expect i.e. it now completes 
the argument for dirs etc.

I've used a test-case:
 ls currentdir/emp<Tab>
which gets
 currentdir/empty/
 currentdir/emptyfile

Regards
Tom


-- 
Users can unsubscribe from the list by sending email to 
emelfm2-request@xxxxxxxxxxxxx with 'unsubscribe' in the subject field or by 
logging into the web interface.

Other related posts: