1
0
Fork 0
mirror of https://gitlab.com/mlunax/dotfiles.git synced 2025-04-18 16:26:50 +00:00

ctrl-z switch

This commit is contained in:
Luna 2020-11-03 20:53:30 +01:00
parent 61d6a2f969
commit 33de9280e0
No known key found for this signature in database
GPG key ID: 05246084ED6DAD21

11
.zshrc
View file

@ -18,6 +18,17 @@ for f in $OTHER/*.zsh; do
fi
done
# Turn control+z into a toggle switch
ctrlz() {
if [[ $#BUFFER == 0 ]]; then
fg >/dev/null 2>&1 && zle redisplay
else
zle push-input
fi
}
zle -N ctrlz
bindkey '^Z' ctrlz
if [ -d "$HOME/.zsh-custom" ]; then
for f in $HOME/.zsh-custom/*; do
if [ -f $f ]; then