Shell updates

This commit is contained in:
2021-04-09 09:06:31 +01:00
parent a4400e39ad
commit 6cb9189809
3 changed files with 20 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
autoload -Uz compinit
compinit
function _add-sshkey(){
local -a identities
# check for .ssh folder presence
if [[ ! -d $HOME/.ssh ]]; then
return
fi
for id in $HOME/.ssh/id_ed25519_*; do
name=$(basename $id|cut -d'_' -f3|cut -d'.' -f1)
[[ ${id:-3} != 'pub' ]] && identities+=$name
done
compadd $identities
}
compdef _add-sshkey add-sshkey

View File

@@ -1,4 +1,3 @@
# Source shell common
for f in ~/.config/shell-common/*.sh; do
source $f;