mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-06-28 06:41:43 +00:00
Release 2.18.0
This commit is contained in:
@ -635,6 +635,7 @@ _set_new_action() {
|
||||
# ${!x} -> ${hello} -> "world"
|
||||
_shtab_ahriman() {
|
||||
local completing_word="${COMP_WORDS[COMP_CWORD]}"
|
||||
local previous_word="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
local completed_positional_actions
|
||||
local current_action
|
||||
local current_action_args_start_index
|
||||
@ -691,6 +692,10 @@ _shtab_ahriman() {
|
||||
if [[ $pos_only = 0 && "${completing_word}" == -* ]]; then
|
||||
# optional argument started: use option strings
|
||||
COMPREPLY=( $(compgen -W "${current_option_strings[*]}" -- "${completing_word}") )
|
||||
elif [[ "${previous_word}" == ">" || "${previous_word}" == ">>" ||
|
||||
"${previous_word}" =~ ^[12]">" || "${previous_word}" =~ ^[12]">>" ]]; then
|
||||
# handle redirection operators
|
||||
COMPREPLY=( $(compgen -f -- "${completing_word}") )
|
||||
else
|
||||
# use choices & compgen
|
||||
local IFS=$'\n' # items may contain spaces, so delimit using newline
|
||||
|
Reference in New Issue
Block a user