mirror of
https://github.com/nikdoof/dotfiles.git
synced 2026-01-30 10:58:14 +00:00
Add dumb completion to add-sshkey
This commit is contained in:
@@ -41,6 +41,11 @@ function add-sshkey() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _add-sshkey-completions() {
|
||||||
|
COMPREPLY=( $(ls -1 ${HOME}/.ssh/id_*|cut -d'_' -f 3|cut -d'.' -f 1|sed 's/@//'|sort|uniq) )
|
||||||
|
}
|
||||||
|
complete -F _add-sshkey-completions add-sshkey
|
||||||
|
|
||||||
# Switch to a simple prompt for demos (thanks Mark H for the idea)
|
# Switch to a simple prompt for demos (thanks Mark H for the idea)
|
||||||
function demoprompt() {
|
function demoprompt() {
|
||||||
if [ ! -z ${OLDPS1+x} ]; then
|
if [ ! -z ${OLDPS1+x} ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user