From fe2e0314cf19744ef70cf6bc839dab3c22eac935 Mon Sep 17 00:00:00 2001 From: maudin Date: Tue, 25 Oct 2022 15:41:35 +0200 Subject: [PATCH] disable foreach reserved word, removed some old aliases, comment some ssh completion to try (again) to fix it --- hybris.completions | 2 +- hybris.zsh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hybris.completions b/hybris.completions index 65a4754..a66f168 100644 --- a/hybris.completions +++ b/hybris.completions @@ -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 diff --git a/hybris.zsh b/hybris.zsh index b5ba8b7..e92a96e 100644 --- a/hybris.zsh +++ b/hybris.zsh @@ -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