diff options
-rw-r--r-- | ksh_aliases | 1 | ||||
-rw-r--r-- | ksh_completion | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/ksh_aliases b/ksh_aliases index 70e91fb..e5b1071 100644 --- a/ksh_aliases +++ b/ksh_aliases @@ -45,3 +45,4 @@ alias tallproj='task rc.list.all.projects=1 projects' alias ttoday='task ml_due_or_scheduled_today' alias gloga='git log --oneline --decorate --graph --all' alias venvact='. ./.venv/bin/activate' +alias pushyulqen='rsync -avzh /home/lemon/code/html/yulqen.org/ lemon@joannalemon.com:/var/www/yulqen.org/' diff --git a/ksh_completion b/ksh_completion new file mode 100644 index 0000000..7c4d92f --- /dev/null +++ b/ksh_completion @@ -0,0 +1,14 @@ +set -A SSH_KNOWN_HOSTS ~/.ssh/known_hosts + +if [ -f /etc/ssh/ssh_known_hosts ]; then + SSH_KNOWN_HOSTS="${SSH_KNOWN_HOSTS[@]} /etc/ssh/ssh_known_hosts" +fi + +#HOST_LIST=$(awk '{split($1,a,","); gsub("].*", "", a[1]); gsub("\[", "", a[1]); print a[1] " root@" a[1]}' $SSH_KNOWN_HOSTS | sort | uniq) +HOST_LIST=$(awk '{split($1,a,","); print a[1] " root@" a[1]}' $SSH_KNOWN_HOSTS | sort | uniq) + +set -A complete_ssh -- $HOST_LIST +set -A complete_scp -- $HOST_LIST + +PASS_ITEMS=$(find /home/lemon/.password-store/ | awk -F'/' '{ print $(NF) }' | awk -F '.gpg' '{ print $1 }') +set -A complete_pass -- $PASS_ITEMS |