zsh: Add tcd and ttcd

This commit is contained in:
mattr
2025-04-23 16:19:25 -05:00
parent 3654cd5273
commit cfc69bfa03

View File

@@ -104,10 +104,9 @@ eval "$(oh-my-posh init zsh --config $HOME/.config/ohmyposh/ohmyposh.toml)"
alias update-grub=' grub2-mkconfig -o /boot/grub2/grub.cfg'
alias cat="bat"
alias grep="rg"
alias rg="rg"
alias rgc="rg --color=always"
alias grepc="rg --color=always"
alias grepc="grep --color=always"
alias sudo='sudo '
@@ -256,3 +255,18 @@ fcd() {
print "Moved to \"$parent\""
fi
}
tcd() {
DIR=$(mktemp -d 2>/dev/null)
if [[ -e "$DIR" ]]; then
cd $DIR
print "Moved to \"$DIR\""
else
print "\"$DIR\" failed to be created"
fi
}
ttcd() {
cd /tmp
tcd
}