1
0
Fork 0

remove unused commands, add ssh completions

This commit is contained in:
Maurice Audin 2022-07-18 17:09:06 +02:00
parent 54045e45fd
commit b0ccb07a44
2 changed files with 10 additions and 4 deletions

View file

@ -4,3 +4,12 @@ compdef _path_commands catwhich
_complete_tramp() {reply=($(ls $INFRA/host && grep "^ [^ ]" ~/dev/robespierre/infra/hosts/all.yml | sed 's/^ *\(.*\):$/\1/'))} _complete_tramp() {reply=($(ls $INFRA/host && grep "^ [^ ]" ~/dev/robespierre/infra/hosts/all.yml | sed 's/^ *\(.*\):$/\1/'))}
compctl -K _complete_tramp tramp compctl -K _complete_tramp tramp
function _myssh(){
# Add bearstech hosts
compadd $(ls $INFRA/host)
# Add own hosts
compadd $(cat ~/dev/robespierre/infra/hosts/all.yml | grep "^ [^ ]" | sed 's/ *\(.*\):/\1/')
}
compdef _myssh r
compdef _myssh ra

View file

@ -1,12 +1,11 @@
# keychain # keychain
zstyle :omz:plugins:keychain agents gpg,ssh zstyle :omz:plugins:keychain agents gpg,ssh
zstyle :omz:plugins:keychain identities id_rsa D79CA887 zstyle :omz:plugins:keychain identities id_rsa id_ed25519 D79CA887
zstyle :omz:plugins:keychain options --quiet zstyle :omz:plugins:keychain options --quiet
# bip at command end, resize font # bip at command end, resize font
function precmd() { function precmd() {
echo -n -e "\a" echo -n -e "\a"
# [ -n "${DISPLAY}" ] && /home/hybris/.scripts/term-fontsize
} }
# history file # history file
@ -18,8 +17,6 @@ SAVEHIST=500000
# Everyday aliases # Everyday aliases
catwhich() {echo "\e[35mPath: $(which $1)\n\e[39m"; cat $(which $1)} catwhich() {echo "\e[35mPath: $(which $1)\n\e[39m"; cat $(which $1)}
colorixe() {for a in $@; do ccat $a | less; done}
dchroot() {docker run --rm --privileged -ti $@ debian:stretch /bin/bash}
dontknow() {echo -n "¯\\_(ツ)_/¯" | xclip} dontknow() {echo -n "¯\\_(ツ)_/¯" | xclip}
dualscreen() {[ $# -eq 1 ] && xrandr --auto && xrandr --output $1 --primary --output eDP1 --left-of $1} dualscreen() {[ $# -eq 1 ] && xrandr --auto && xrandr --output $1 --primary --output eDP1 --left-of $1}
e() {emacsclient -n $@ > /dev/null 2>&1} e() {emacsclient -n $@ > /dev/null 2>&1}