Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Add _sqlite for sqlite and sqlite3 completion.



On Mar 19, 10:11am, Benjamin R. Haskell wrote:
} Subject: [PATCH] Add _sqlite for sqlite and sqlite3 completion.
}
} 1. Is there an easy way to specify to _arguments that '-opt' and
} '--opt' should be treated as equivalent?

No, not really.  Because of the possibility that "-opt" is short for
"-o -p -t", _arguments makes it the job of the caller to distinguish.

} Is there a quick way to specify:
} 
} Prefer files that match *.$service
} If no files match that, try *.db or *.sqlite(|3)
} If no files match that, show all files

That's a job for the file-patterns style.  Don't attempt to figure out
in the _arguments settings what files are suitable; before calling
_arguments, check whether file-patterns is set for the appropriate
context and if it is not then assert a setting for it.  (Or don't,
and make the user do it.)  Then let _files work out the conditional.



Messages sorted by: Reverse Date, Date, Thread, Author