From dbefe08f3ef9921c2e02e481659f3caa5e8aabe9 Mon Sep 17 00:00:00 2001 From: Matt Koscica Date: Fri, 18 Feb 2022 09:02:11 +0100 Subject: github #87 (tweaked): update options tmux 3.4 Import completion updates from tmux.git, the revision used was c67abcf8182b, and the updates were generated by Util/check-tmux-state. check-tmux-state: changes to output parsing + variable declaration parsing of `tmux show-options` is slightly more idiomatic (thanks to @phy1729 for the syntax), and it now also ignores user-specified options (which are prefixed with an @ symbol). the lines defining and declaring supported_server_options were also swapped to the correct order - `typeset` was being called after supported_server_options was populated, contrary to all the other supported_*/available_* arrays used in the same area of the file. --- Util/check-tmux-state | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) mode change 100644 => 100755 Util/check-tmux-state (limited to 'Util/check-tmux-state') diff --git a/Util/check-tmux-state b/Util/check-tmux-state old mode 100644 new mode 100755 index 2c6106203..d95e0c230 --- a/Util/check-tmux-state +++ b/Util/check-tmux-state @@ -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 -- cgit v1.2.3