From 77b53e04ddc67688b9fb9ad746ce39f6333b62a5 Mon Sep 17 00:00:00 2001 From: Dessa Xaviera Date: Sun, 25 May 2025 16:18:48 -0700 Subject: [PATCH] add zsh config --- .zshconfig/99-aliases.zsh | 20 ++++++++++++++++++++ .zshrc | 11 +++++++++++ 2 files changed, 31 insertions(+) create mode 100644 .zshconfig/99-aliases.zsh create mode 100644 .zshrc diff --git a/.zshconfig/99-aliases.zsh b/.zshconfig/99-aliases.zsh new file mode 100644 index 0000000..21520b7 --- /dev/null +++ b/.zshconfig/99-aliases.zsh @@ -0,0 +1,20 @@ +alias curl="curl -L" +alias find=bfs +alias genpass=$'dd status=none if=/dev/urandom bs=2048 count=1|LANG=C.UTF-8 grep -Pao \'[a-zA-Z0-9`~!@#$%^&*()_+-=\\[\\]{}|:;<>?/.,]\'|tail -n32|tr -d "\\n";echo' +alias rm="rm -v" +alias watch="watch " # allow aliases in watch + +alias ip="ip -c" +alias ipa="ip -br a" +alias ipl="ip -br l" +alias ip6="ip -6 a|grep -E -v -B 1 -e 'scope (link|host)' -e valid_lft -e '^[0-9]*:' --color=no" +alias ipr="ip r" + +alias k="kubectl" +alias kns="kubens" +alias kctx="kubectx" + +alias git-amend-push="git commit --amend -a --no-edit && git push --force-with-lease" +alias flux-watch="watch flux get kustomization\;echo\;kubectl get helmrelease,cluster,sts,deploy,pod,pvc" +alias flux-refresh="flux reconcile source git flux-system" +alias flux-amend-push="git-amend-push && flux-refresh && flux-watch" diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..35d8e50 --- /dev/null +++ b/.zshrc @@ -0,0 +1,11 @@ +export ZSH=$ZDOTDIR/.zshconfig +export EDITOR="vim" +export VISUAL="vim" + +autoload -U compinit && compinit +autoload -U colors && colors + +for file in $ZSH/*.zsh;do source $file;done + +eval "$(direnv hook zsh)" +eval "$(atuin init zsh --disable-up-arrow)"