diff --git a/share/completions/env.fish b/share/completions/env.fish index b845c94da..838296501 100644 --- a/share/completions/env.fish +++ b/share/completions/env.fish @@ -16,7 +16,7 @@ end # Returns 0 if we're after `env` and all previous tokens have not yet contained an equal sign # Prevents `env` completions from completing payload completions. function __fish_env_not_yet_vars - not string match -qe = (commandline -c) + not string match -qe -- = (commandline -c) end # Generate a list of possible variable names to redefine, excluding any already redefined. @@ -43,7 +43,7 @@ end # Generate a list of possible completions for the current variable name from history function __fish_env_values_from_history - string match -rq "(?.+)=(?.*)" (commandline -ct); or return 1 + string match -rq -- "(?.+)=(?.*)" (commandline -ct); or return 1 # Caveat lector: very crude multi-word tokenization handling below! set -l rname (string escape --style=regex -- $name) diff --git a/share/completions/scp.fish b/share/completions/scp.fish index 4d92e0c22..87408a52d 100644 --- a/share/completions/scp.fish +++ b/share/completions/scp.fish @@ -37,7 +37,7 @@ end # # Inherit user/host completions from ssh -complete -c scp -d Remote -n "__fish_no_scp_remote_specified; and not string match -e : (commandline -ct)" -a "(complete -C'ssh ' | string replace -r '\t.*' ':')" +complete -c scp -d Remote -n "__fish_no_scp_remote_specified; and not string match -e -- : (commandline -ct)" -a "(complete -C'ssh ' | string replace -r '\t.*' ':')" # Local path complete -c scp -d "Local Path" -n "not string match @ -- (commandline -ct)" diff --git a/share/completions/zabbix_agentd.fish b/share/completions/zabbix_agentd.fish index e6c0c6280..b00efc785 100644 --- a/share/completions/zabbix_agentd.fish +++ b/share/completions/zabbix_agentd.fish @@ -5,7 +5,7 @@ set -l runtime userparameter_reload \ log_level_decrease= function __fish_string_in_command -a ch - string match -rq $ch (commandline) + string match -rq -- $ch (commandline) end function __fish_prepend -a prefix diff --git a/share/completions/zabbix_proxy.fish b/share/completions/zabbix_proxy.fish index d6baec4fb..abb6e15cb 100644 --- a/share/completions/zabbix_proxy.fish +++ b/share/completions/zabbix_proxy.fish @@ -9,7 +9,7 @@ set -l runtime config_cache_reload \ log_level_decrease= function __fish_string_in_command -a ch - string match -rq $ch (commandline) + string match -rq -- $ch (commandline) end function __fish_prepend -a prefix diff --git a/share/completions/zabbix_server.fish b/share/completions/zabbix_server.fish index 028a99efe..4e52fd606 100644 --- a/share/completions/zabbix_server.fish +++ b/share/completions/zabbix_server.fish @@ -21,7 +21,7 @@ set -l runtime config_cache_reload \ set -l scope rwlock mutex processing function __fish_string_in_command -a ch - string match -rq $ch (commandline) + string match -rq -- $ch (commandline) end function __fish_prepend -a prefix diff --git a/share/functions/__fish_npm_helper.fish b/share/functions/__fish_npm_helper.fish index ea84dd325..1e154611a 100644 --- a/share/functions/__fish_npm_helper.fish +++ b/share/functions/__fish_npm_helper.fish @@ -30,7 +30,7 @@ function __npm_filtered_list_packages end # Do not provide any completions if nothing has been entered yet to avoid long hang. - if string match -rq . (commandline -ct) + if string match -rq -- . (commandline -ct) # Filter the results here rather than in the C++ code due to #5267 # `all-the-package-names` reads a billion line JSON file using node (slow) then prints # it all (slow) using node (slow). Directly parse the `names.json` file that ships with it instead.