Add chcode editor alias

This commit is contained in:
2024-10-07 19:41:00 -05:00
parent 08890fa10c
commit 3ba0bd44ce

View File

@@ -16,6 +16,11 @@ alias l='ls -CF'
# https://docs.gitignore.io/install/command-line
function gi() { curl -sL https://www.toptal.com/developers/gitignore/api/$@ ;}
function chcode() {
EDITOR="code --wait"
chezmoi edit $1
}
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'