diff options
author | Joe Rayhawk <jrayhawk@fairlystable.org> | 2025-04-30 02:07:56 -0700 |
---|---|---|
committer | Joe Rayhawk <jrayhawk@fairlystable.org> | 2025-04-30 02:07:56 -0700 |
commit | 26e09889646be3ea65b4a3dfeda26213e4bb6a27 (patch) | |
tree | 4f3c73a9416bf47ad7e125383d23cf42879e38d7 /Util/check-tmux-state | |
parent | 841bce705a58b04220b1f257abcc00ae71cbdbdc (diff) | |
parent | 001cba48ce3b964cf01fb3e2af54b20eacbc9bf5 (diff) | |
download | zsh-26e09889646be3ea65b4a3dfeda26213e4bb6a27.tar.gz zsh-26e09889646be3ea65b4a3dfeda26213e4bb6a27.zip |
Merge branch 'upstream' into debian
Diffstat (limited to 'Util/check-tmux-state')
-rwxr-xr-x[-rw-r--r--] | Util/check-tmux-state | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Util/check-tmux-state b/Util/check-tmux-state index 2c6106203..9772eefc1 100644..100755 --- a/Util/check-tmux-state +++ b/Util/check-tmux-state @@ -59,7 +59,7 @@ __tmux-window-options # in the _tmux function definition file. typeset -a supported_commands supported_commands=( $( grep '^_tmux-[^(]*() *{$' $func | - sed -e 's,^.*\<_tmux-,,' -e 's,(.*$,,' ) ) + sed -e 's,^_tmux[-]\([a-z-]*\)[(].*,\1,' ) ) # Ask tmux for available commands: typeset -a available_commands @@ -74,18 +74,18 @@ available_aliases=( $( $tmux list-commands | # Gather information about options: typeset -a supported_session_options supported_session_options=( ${"${tmux_session_options[@]}"%%:*} ) -typeset -a available_session_options -available_session_options=( $( $tmux show-options -g | cut -f1 -d' ' ) ) +typeset -aU available_session_options +available_session_options=( ${${${(f)"$($tmux show-options -g)"}:#@*}%%(\[<->\])# *} ) -typeset -a available_server_options -supported_server_options=( ${"${tmux_server_options[@]}"%%:*} ) typeset -a supported_server_options -available_server_options=( $( $tmux show-options -s -g | cut -f1 -d' ' ) ) +supported_server_options=( ${"${tmux_server_options[@]}"%%:*} ) +typeset -aU available_server_options +available_server_options=( ${${${(f)"$($tmux show-options -s -g)"}:#@*}%%(\[<->\])# *} ) typeset -a supported_window_options supported_window_options=( ${"${tmux_window_options[@]}"%%:*} ) -typeset -a available_window_options -available_window_options=( $( $tmux show-options -w -g | cut -f1 -d' ' ) ) +typeset -aU available_window_options +available_window_options=( ${${${(f)"$($tmux show-options -w -g)"}:#@*}%%(\[<->\])# *} ) typeset -a supported available |