From 67f38b3f5ec2f146a92e990fddae16e4ff59a958 Mon Sep 17 00:00:00 2001 From: Vasil Zlatanov Date: Fri, 5 Feb 2021 11:55:44 +0000 Subject: Update zsh aliases --- Shell/bash_aliases | 21 ++++++++++++++++++--- Shell/forgit.plugin.zsh | 9 +++------ Shell/zshrc | 5 ++++- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/Shell/bash_aliases b/Shell/bash_aliases index c5d52f7..6288e86 100644 --- a/Shell/bash_aliases +++ b/Shell/bash_aliases @@ -1,6 +1,21 @@ #if you wanna change timezone just copy one of /usr/share/zoneinfo/place to /etc/localtime - -alias ssh='kitty +kitten ssh -Y' +alias fluxw='flux --kubeconfig=/home/vsz/.kube/config-work' +alias helmw='helm --kubeconfig=/home/vsz/.kube/config-work' +alias fluxwp='flux --kubeconfig=/home/vsz/.kube/config-work-prod' +alias fluxn='flux --kubeconfig=/home/vsz/.kube/config-new' +alias kw='kubectl --kubeconfig=/home/vsz/.kube/config-work' +alias kwp='kubectl --kubeconfig=/home/vsz/.kube/config-work-prod' +alias kn='kubectl --kubeconfig=/home/vsz/.kube/config-new' +alias helmn='helm --kubeconfig=/home/vsz/.kube/config-new' +alias uncl='ssh vasil@blindgoby '\"'reclassify-urls --new-status unclassified --read <(echo $(xclip -o selection clipboard)) --limit 1 --user "vasil@netcraft.com"'\" +alias pa='cd ~/dou-ops;ansible all -i ansible/inventory -m shell -a' +alias fl='kubectl -n flux logs' +alias k='kubectl' +alias ka='kubectl get all -A' + +alias icat='kitty +kitten icat' +alias sshfs='sshfs -o StrictHostKeyChecking=no,Compression=no,reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,allow_other,Ciphers=aes128-ctr,cache_timeout=115200,attr_timeout=115200' +#alias ssh='kitty +kitten ssh -Y' alias vim='nvim' #bauerbill alias bb='baurebill' @@ -179,7 +194,7 @@ alias ana='vim ~/Sync/Notes/EE2/Analogue-Electronics-2.md ' alias com='vim ~/Sync/Notes/EE2/Communication-Systems.md ' alias con='vim ~/Sync/Notes/EE2/Control-Engineering.md ' alias dev='vim ~/Sync/Notes/EE2/Devices.md ' -alias dig='vim ~/Sync/Notes/EE2/Digital-Electronics-2.md ' +#alias dig='vim ~/Sync/Notes/EE2/Digital-Electronics-2.md ' alias fie='vim ~/Sync/Notes/EE2/Fields.md ' alias arc='vim ~/Sync/Notes/EE2/Introduction-to-Computer-Architecture.md' alias mata='vim ~/Sync/Notes/EE2/Mathematics-2a.md ' diff --git a/Shell/forgit.plugin.zsh b/Shell/forgit.plugin.zsh index 35e54a1..6a02a34 100644 --- a/Shell/forgit.plugin.zsh +++ b/Shell/forgit.plugin.zsh @@ -4,21 +4,18 @@ forgit::warn() { printf "%b[Warn]%b %s\n" '\e[0;33m' '\e[0m' "$@" >&2; } forgit::info() { printf "%b[Info]%b %s\n" '\e[0;32m' '\e[0m' "$@" >&2; } forgit::inside_work_tree() { git rev-parse --is-inside-work-tree >/dev/null; } -# https://github.com/so-fancy/diff-so-fancy -hash diff-so-fancy &>/dev/null && forgit_fancy='|diff-so-fancy' -# https://github.com/wfxr/emoji-cli -hash emojify &>/dev/null && forgit_emojify='|emojify' +forgit_fancy='|delta --theme="base16"' # git commit viewer forgit::log() { forgit::inside_work_tree || return 1 local cmd opts - cmd="echo {} |grep -Eo '[a-f0-9]+' |head -1 |xargs -I% git show --color=always % $* $forgit_fancy" + cmd="echo {} | perl -ne 'print \$1 if /([a-f0-9]+)/;'|xargs -I% git show --color=always % $* $forgit_fancy" opts=" $FORGIT_FZF_DEFAULT_OPTS +s +m --tiebreak=index --exact --preview=\"$cmd\" --bind=\"enter:execute($cmd |LESS='-R' less)\" - --bind=\"ctrl-y:execute-silent(echo {} |grep -Eo '[a-f0-9]+' | head -1 | tr -d '\n' |${FORGIT_COPY_CMD:-pbcopy})\" + --bind=\"ctrl-y:execute-silent(echo {} |perl -ne 'print \$1 if /([a-f0-9]+)/;' | xclip -selection clipboard)\" $FORGIT_LOG_FZF_OPTS " eval "git log --graph --color=always --format='%C(auto)%h%d %s %C(black)%C(bold)%cr' $* $forgit_emojify" | diff --git a/Shell/zshrc b/Shell/zshrc index 25d338a..24829cb 100644 --- a/Shell/zshrc +++ b/Shell/zshrc @@ -23,7 +23,7 @@ source ~/.bash_aliases KEYTIMEOUT=2 export GPGKEY="895134C5" -export PATH="$HOME/bin:$PATH" +export PATH="$HOME/bin:$HOME/.cargo/bin:$PATH" export EDITOR="vim" export LD_LIBRARY_PATH=/usr/local/lib @@ -87,3 +87,6 @@ bindkey '^[[1;5D' emacs-backward-word source /usr/share/fzf/key-bindings.zsh source ~/dotfiles/Shell/forgit.plugin.zsh source ~/dotfiles/Shell/ssh-agent.plugin.zsh +source ~/.config/base16-shell/base16-shell.plugin.zsh +export TERM=xterm +. <(flux completion zsh) -- cgit v1.2.3