mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 13:23:09 +00:00
completions/tmux: complete all subcommands when tmux lscm
works
For example, `tmux shell<tab>` now completes to `if-shell` and `run-shell`, though no additional information is provided.
This commit is contained in:
parent
edaf011ab1
commit
760ee224c0
1 changed files with 4 additions and 0 deletions
|
@ -20,6 +20,10 @@ end
|
||||||
#don't allow dirs in the completion list...
|
#don't allow dirs in the completion list...
|
||||||
complete -c tmux -x
|
complete -c tmux -x
|
||||||
|
|
||||||
|
# Complete even commands not explicitly listed below, as long as `tmux list-commands` works
|
||||||
|
set -l all_commands (tmux list-commands -F "#{command_list_name} #{command_list_alias}" 2>/dev/null)
|
||||||
|
and complete -c tmux -n __fish_use_subcommand -a "$all_commands"
|
||||||
|
|
||||||
############### Begin: Front Flags ###############
|
############### Begin: Front Flags ###############
|
||||||
#these do not require parameters
|
#these do not require parameters
|
||||||
complete -c tmux -n __fish_use_subcommand -s 2 -d 'Force tmux to assume the terminal supports 256 colours'
|
complete -c tmux -n __fish_use_subcommand -s 2 -d 'Force tmux to assume the terminal supports 256 colours'
|
||||||
|
|
Loading…
Reference in a new issue