On Fri, Apr 13, 2012 at 5:01 PM, SanskritFritz <sanskritfr...@gmail.com>wrote:

>
> On Fri, Apr 13, 2012 at 3:47 PM, Maxim Gonchar <gma...@gmail.com> wrote:
>
>> And everything that should be done for it is to stop fish calling '-a'
>> script when calling completion of 'cmd -'. Just like Sanskrit Fritz have
>> written in first message.
>>
>
> The problem is actually pretty serious, I just discovered, that nasty side
> effects could arise by executing -a unnecessarily, see this example:
>
> git log --pretty<press tab>
> git log --prettyfatal: Not a git repository (or any of the parent
> directories): .git
> fatal: Not a git repository (or any of the parent directories): .git
>
> So, upon completing git log --pretty, some git commands were issued, which
> is definitely not desired.
>
>
Hmm, thinking further about this, I came to the following conclusion: when
-a is used alone without -s or -l options in a complete definition, fish
considers it an argument for all options and executes it so it can prompt
all possible option=argument values. Makes sense actually. Question is, how
can we prevent fish to execute the -a if it is intended as an argument for
a command and not for an option.
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to