disable foreach reserved word, removed some old aliases, comment some ssh completion to try (again) to fix it
This commit is contained in:
parent
4c46de65c3
commit
fe2e0314cf
2 changed files with 4 additions and 3 deletions
|
|
@ -9,7 +9,7 @@ function _myssh(){
|
|||
# Add bearstech hosts
|
||||
compadd $(ls $INFRA/host)
|
||||
# Add own hosts
|
||||
compadd $(cat ~/dev/robespierre/infra/hosts/all.yml | grep "^ [^ ]" | sed 's/ *\(.*\):/\1/')
|
||||
# compadd $(cat ~/dev/robespierre/infra/hosts/all.yml | grep "^ [^ ]" | sed 's/ *\(.*\):/\1/')
|
||||
}
|
||||
compdef _myssh r
|
||||
compdef _myssh ra
|
||||
|
|
|
|||
|
|
@ -15,10 +15,12 @@ setopt HIST_EXPIRE_DUPS_FIRST
|
|||
HISTSIZE=500000
|
||||
SAVEHIST=500000
|
||||
|
||||
# Disable reserved word foreach
|
||||
disable -r foreach
|
||||
|
||||
# Everyday aliases
|
||||
catwhich() {echo "\e[35mPath: $(which $1)\n\e[39m"; cat $(which $1)}
|
||||
dontknow() {echo -n "¯\\_(ツ)_/¯" | xclip}
|
||||
dualscreen() {[ $# -eq 1 ] && xrandr --auto && xrandr --output $1 --primary --output eDP1 --left-of $1}
|
||||
e() {emacsclient -n $@ > /dev/null 2>&1}
|
||||
tramp() {emacsclient -n $(for x in $@; do echo /root@$x:README; done) > /dev/null 2>&1}
|
||||
fd() {fdfind -H -I -L $@}
|
||||
|
|
@ -29,7 +31,6 @@ loop() {while [ 1 ]; do sh -c "$@"; done}
|
|||
open_ports() {if [ $# -eq 1 ] && [ $1 = "public" ]; then sudo netstat -tulpen 2> /dev/null | grep "LISTEN" | grep -v "127.0.0.1"; else sudo netstat -tulpen 2> /dev/null | grep "LISTEN"; fi}
|
||||
r() {if [ $# -gt 0 ]; then for h in $@; do ssh root@$h; done; else sudo su -; fi}
|
||||
ra() {if [ $# -gt 0 ]; then for h in $@; do ssh -A root@$h; done; else sudo su -; fi}
|
||||
sc-error() {xdg-open "https://github.com/koalaman/shellcheck/wiki/$1"}
|
||||
|
||||
# Usefull bindings
|
||||
bindkey "^[Od" backward-word
|
||||
|
|
|
|||
Loading…
Reference in a new issue