summaryrefslogtreecommitdiff
path: root/Util/check-tmux-state
diff options
context:
space:
mode:
Diffstat (limited to 'Util/check-tmux-state')
-rwxr-xr-x[-rw-r--r--]Util/check-tmux-state16
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