Skip to content

Commit

Permalink
Merge pull request scop#1152 from scop/feat/ssh-add-improvements
Browse files Browse the repository at this point in the history
feat: ssh-add improvements
  • Loading branch information
scop committed Apr 4, 2024
2 parents 39ea543 + 2beb012 commit 50865aa
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions completions/ssh-add
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,34 @@ _comp_cmd_ssh_add()
_comp_compgen -- -W 'md5 sha256'
return
;;
-*H)
_comp_compgen_filedir
return
;;
-*h)
# TODO should we try supporting more types of constraints?
if [[ $cur == *@* ]]; then
_comp_complete_user_at_host "$@"
else
_comp_compgen_known_hosts -- "$cur"
fi
return
;;
-*t)
return
;;
-*T)
_comp_compgen_filedir
return
;;
-*[se])
-*S | -*[se])
_comp_compgen_filedir so
return
;;
esac

if [[ $cur == -* ]]; then
_comp_compgen_help -- '-?'
_comp_compgen_usage -- '-?' || _comp_compgen_help -- '-?'
return
fi

Expand Down

0 comments on commit 50865aa

Please sign in to comment.