Check if the command line contains any given number of flags.
Go to file
2021-08-09 19:37:03 -03:00
functions Initial commit 2021-08-07 19:22:15 -03:00
hooks Initial commit 2021-08-07 19:22:15 -03:00
LICENSE Initial commit 2021-08-07 19:22:15 -03:00 Update 2021-08-09 19:37:03 -03:00

GPL License Fish Shell Version Oh My Fish Framework


A plugin for Oh My Fish.

Check if the command line contains any of the listed flags. If no flags are listed, it tests if the command line contains any flag at all. Most useful as a condition to trigger context aware completions for a command.


contains_opts a long_flag_a -oldstyle_flag_a

Example usage

complete -rc $cmd -n 'not contains_opts' -s s -l save -d 'Bookmark directory'

Only display option -s/--save if no other flags are present.

complete -rc $cmd -n 'contains_opts s save' -a "$bookmark" -d "$path"

Display bookmarks when option -s/--save is present.


omf repositories add 
omf install contains_opts