dotfiles/dot_local/scripts/zsh/aliases.zsh

28 lines
707 B
Bash
Raw Normal View History

2020-06-15 08:54:40 +00:00
alias subl="nvim"
alias rm="garbage put"
alias cm="chezmoi"
alias kill-gpg-agent="gpgconf --kill gpg-agent"
2020-06-15 09:38:18 +00:00
function ced() {
# if the file doesn't exist, prompt to make a new one
if [ ! -f "$1" ]; then
read "?$1 doesn't exist.. create file? [yN] " yn
case $yn in
[Yy]* )
echo "creating new file"
install -D /dev/null $1
echo "\n" > $1
chezmoi add $1;;
* )
echo "nah"
return;;
esac
fi
chezmoi edit $1
echo "applying changes..."
chezmoi apply
}
2020-06-15 08:54:40 +00:00
cpush() { chezmoi git add . -- -A && chezmoi git commit -- -m "update" && chezmoi git push }