diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl index 4b852aa..757de3d 100644 --- a/dot_zshrc.tmpl +++ b/dot_zshrc.tmpl @@ -40,6 +40,11 @@ export FAVORITE_COMMAND4="{{ .tmux_favorite4 }}" alias cdd='cd {{ .deploydir }}' export cdd={{ .deploydir }} +alias rm='rm --interactive --verbose' +alias mv='mv --interactive --verbose' +alias cp='cp --verbose --interactive' +alias dmesg='dmesg -T' +alias grep='grep --color' # --------------------------------------------------------------------------- # History @@ -82,6 +87,15 @@ alias vi=$EDITOR # Tmux # --------------------------------------------------------------------------- +if command -v tmux &>/dev/null; then + alias ta='tmux attach' + + alias tkill="for s in \$(tmux list-sessions | awk -F ':' '{print \$1}' | fzf); do + tmux kill-session -t \$s; + done" +fi + + # Function to set tmux window title function set_tmux_title { if [[ -n "$TMUX" ]]; then @@ -172,3 +186,15 @@ if command -v mvn &>/dev/null; then # copy maven artifact alias d="python3 ~/.local/bin/deploy.py '$cdd'" fi + +# --------------------------------------------------------------------------- +# Nix +# --------------------------------------------------------------------------- + +if command nix-env &>/dev/null; then + alias nix-update='nix-channel --update && nix-env -u' + + nix-search() { + nix-env -qa --description ".*$1.*" + } +fi \ No newline at end of file