Presumably you could do something like this: ``` function complete complete --authoritative $argv end funcsave complete ```
I have not tested this. Make backups and ensure you have an alternative shell installed and enabled if you are going to try it, because you might need to delete ~/.config/fish/functions/complete.fish. [DAA] On Wed, 5 Nov 2014, Santhosh T wrote: > HI David, > > so the feature is there. is there any way to make authoritative by default > explicitly > > - santhosh > > On Wed, Nov 5, 2014 at 9:24 AM, David Adam <zanc...@ucc.gu.uwa.edu.au> > wrote: > > > This functionality was altered before the release of fish 2.0.0. > > > > Commit 6eb66770a49944 [1] makes completions non-authoritative by default. > > If you pass the `--authoritative` argument to your completions, the > > behaviour you describe will return. However, this is not enabled for > > completions shipped with fish because of the difficulty in maintaining > > parity between these completions and the upstream program. > > > > With the next release of fish, a supported path for completions shipped by > > upstream vendors will be available; these can make use of the > > `--authoritative` option for even better syntax highlighting. > > > > Hope that helps! > > > > David Adam > > zanc...@ucc.gu.uwa.edu.au > > > > > > [1]: https://github.com/fish-shell/fish-shell/commit/6eb66770a49944 > > > > On Mon, 3 Nov 2014, Santhosh T wrote: > > > the article http://lwn.net/Articles/136232/ says that > > > fish shell can show misspelled options as errors. > > > > > > it has a screenshot also where "--colour" is highlighted in red in "ls > > > --colour" command. > > > > > > > > > > > > when I tried the same, it didn't work. > > > > > > so i asked the question.... > > > > > > - santhosh > > > > > > > > > > > > On Mon, Nov 3, 2014 at 2:39 PM, Cedric Auger <sedri...@gmail.com> wrote: > > > > > > > > > > > > > > > 2014-10-31 17:58 GMT+01:00 Santhosh T <santhosh.tek...@gmail.com>: > > > > > > > >> when i type "ls --unknownoption" > > > >> > > > >> i am expected "--unknownoption" to be shown in red. > > > >> > > > >> fish only showing wrong commands in red color, but not wrong options > > > >> > > > >> i already did run "fish_update_completions" > > > >> > > > >> I am using MAC > > > >> > > > >> thanks > > > >> Santhosh > > > >> > > > >> > > > >> > > > > I first glance, I would say, that it is not a realistic feature. > > > > How could you tell if a given option is a right or a wrong one? > > > > > > > > For the command, work is easy: just ask the file system is there is > > such > > > > an executable program. > > > > But there is no Unix command which tells given a program and options if > > > > they are compatible. > > > > Of course, like autocompletion, you could forbid some options (but that > > > > would concern only very specific programs for which the set of "good" > > > > options can be easily known). > > > > Plus there should be some clever parsing, as for example "ls -- > > > > --unknownoption" is a valid command (at least on the Ubuntu version I > > have). > > > > That is because I can create a file named "--unknownoption". > > > > > > > > > > > > -- > > > > .../Sedrikov\... > > > > > > > > > > > Cheers, > > > > David Adam > > zanc...@ucc.gu.uwa.edu.au > > Ask Me About Our SLA! > > > Cheers, David Adam zanc...@ucc.gu.uwa.edu.au Ask Me About Our SLA! ------------------------------------------------------------------------------ _______________________________________________ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users