mirror of
https://github.com/mqttr/dotfiles.git
synced 2025-12-15 04:25:50 -06:00
zsh: Add tcd and ttcd
This commit is contained in:
18
zsh/.zshrc
18
zsh/.zshrc
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user