mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-28 04:46:34 -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 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
|
||||
elif [ "${#COMP_WORDS[@]}" -gt "4" ]; then
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user