Hi Leonardo,

For the first issue, I think what you're seeing is that the completions are 
initially not loaded.  If you repeat your experiment twice, you'll see it 
behaves the way you expect the second time, which is that explicit completions 
are preferred to filenames. That is, after a tab, autosuggestions should be 
more sensible because ifconfig's completions will be loaded.

There's some code which attempts to autoload completions for autosuggestions, 
but it may not be working in all cases. Please open an issue at the github 
page. Thanks!

For the second issue, there's a way to indicate that a particular option should 
not do file completion, but not a way to indicate that the command itself 
should not take files. That seems like it would be a reasonable addition as 
well.

Thanks for taking the time to report this,
_fish

On Nov 5, 2012, at 10:28 AM, Leonardo Boiko <leobo...@gmail.com> wrote:

> Hi,
> 
> I'm experimenting with fish.  If I type "ifconfig <TAB>", I get:
> 
>     > ifconfig
>     -allmulti     arp                          io_addr                  
> netmask                  
>     -arp          broadcast                    irq                      
> pointopoint              
>     -broadcast    del                          lo  (Network interface)  
> promisc                  
>     -pointopoint  down       (Stop interface)  media                    sit0  
> (Network interface)
>     -promisc      dstaddr                      mem_start                sit1  
> (Network interface)
>     add           eth0    (Network interface)  metric                   
> tunnel                  
>     address       eth0:1  (Network interface)  mtu                      
> txqueuelen              
>     allmulti      hw                           multicast                up    
>   (Start interface)
> 
> This is very cool.  However, if I type "ifconfig d", I get:
> 
>     > ifconfig Downloads/
> 
> This is verry jarrying (capitalization and all), since ifconfig has nothing 
> to do with files in the working directory.  If I type a <TAB>, it works as 
> expected:
> 
>     > ifconfig d<TAB>
>     del  down  (Stop interface)  dstaddr
> 
> So, in the above case, it's just the autosuggestion that's totally wrong; the 
> tab completion seems fine.
> 
> However, if I type "ifconfig c"—notice no ifconfig option or subcommand 
> starts with 'c'—it suggests a local filename:
> 
>     > ifconfig chrome.8716.trace
> 
> And in this case even tab completion gets it wrong:
> 
>     > ifconfig c<TAB> 
>     > ifconfig chrome.8716.trace # should beep or do nothing
> 
> So my questions are:
> 
>   - How to I tell fish to never autosuggest filenames for a certain command, 
> ever?
>   - How to I tell fish to never tab-complete filenames for a certain command, 
> ever?
> 
> I tried adding 'complete -c ifconfig -f' with no extra options to 
> ifconfig.fish, but it didn't work.
------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to