mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-05 08:37:14 -04:00
Disallow any additional arguments after "shear"
This commit is contained in:
@@ -18,7 +18,9 @@ _sshyp_completions() {
|
|||||||
local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}")
|
local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}")
|
||||||
local compline="${compwords[*]}"
|
local compline="${compwords[*]}"
|
||||||
|
|
||||||
if [ "${#COMP_WORDS[@]}" -gt "3" ] && (! echo "${COMP_WORDS[@]}" | grep -q '/' || echo "${COMP_WORDS[@]}" | grep -q 'shear'); then
|
if [ "${#COMP_WORDS[@]}" -gt "2" ] && echo "${COMP_WORDS[@]}" | grep -q 'shear'; then
|
||||||
|
return
|
||||||
|
elif [ "${#COMP_WORDS[@]}" -gt "3" ] && (! echo "${COMP_WORDS[@]}" | grep -q '/' || echo "${COMP_WORDS[@]}" | grep -q 'shear'); then
|
||||||
return
|
return
|
||||||
elif [ "${#COMP_WORDS[@]}" -gt "4" ]; then
|
elif [ "${#COMP_WORDS[@]}" -gt "4" ]; then
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user