On Tue, Oct 10, 2017 at 3:17 PM, Mark Volkmann <r.mark.volkm...@gmail.com>
wrote:

> I noticed that I can shorten the long switch --argument-names for a
> function as much as I want and it still works. I can use --argument or
> --arg or even --a. Of course I can also use the short form -a. Is this a
> general feature of fish or do only some commands support using abbreviated
> versions of long switch names as long as only one switch matches it?
>

It's a standard feature of GNU getopt_long(). From its man page:

       The getopt_long() function works like getopt() except that it also
> accepts  long  options,
>        started with two dashes.  (If the program accepts only long
> options, then optstring should
>        be specified as an empty string (""), not NULL.)  Long option names
> may be abbreviated  if
>        the  abbreviation  is  unique or is an exact match for some defined
> option.  A long option
>        may take a parameter, of the form --arg=param or --arg param.


-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to