From 760ee224c0fb5b5b84e4664708aea33e5b27244b Mon Sep 17 00:00:00 2001 From: Ilya Grigoriev Date: Sun, 17 Nov 2024 23:40:00 -0800 Subject: [PATCH] completions/tmux: complete all subcommands when `tmux lscm` works For example, `tmux shell` now completes to `if-shell` and `run-shell`, though no additional information is provided. --- share/completions/tmux.fish | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/completions/tmux.fish b/share/completions/tmux.fish index 9ae15627d..6e6e43470 100644 --- a/share/completions/tmux.fish +++ b/share/completions/tmux.fish @@ -20,6 +20,10 @@ end #don't allow dirs in the completion list... 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 ############### #these do not require parameters complete -c tmux -n __fish_use_subcommand -s 2 -d 'Force tmux to assume the terminal supports 256 colours'