On Fri, 13 Apr 2012 15:39:20 +0400, Gustaf Johansson <gusta...@gmail.com> wrote:
> Given the description of 'complete' I would have expected it to behave > differently, given: > > complete (-c|--command|-p|--path) COMMAND [(-s|--short-option) > SHORT_OPTION] [(-l|--long-option|-o|--old-option) LONG_OPTION > [(-a||--arguments) OPTION_ARGUMENTS] [(-d|--description) DESCRIPTION] > > (which I interpret as ...[(-l|--long-option|-o|--old-option) LONG_OPTION > [(-a||--arguments) OPTION_ARGUMENTS]]... (note the added ] at the end), > but > perhaps my bracket placement is incorrect) > > I would have expected your second line: > > complete --command foo --no-files --arguments '(sleep 5s)' > --description 'slept' > > To be invalid since '-a' does not follow either '-l' or '-o' The help message is not clear enough. -a do not need to follow -l or -s options. There are commands, which use subcommands: svn, git, amixer, rfkill. For example: complete -c svn -a 'add move commit etc' > and I also dont see the logic in that a script given to '-a' ever > returning a list of options. That is also very useful when the list of options is system dependent. Or if command know it's options, then you do not need to type them explicitly. For example type: > su <tab> to see the list of users in the system. The list is generated by complete -c su -a '(__fish_complete_users)' Maxim ------------------------------------------------------------------------------ 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