zsh mappings

This commit is contained in:
thek4n 2024-10-17 10:14:25 +03:00
parent cd8da20d95
commit 436a86a1a4
8 changed files with 38 additions and 3 deletions

2
.gitignore vendored
View File

@ -6,7 +6,7 @@ home/user/.config/nvim/spell
home/user/.config/bash/bashrc.d/* home/user/.config/bash/bashrc.d/*
!home/user/.config/bash/bashrc.d/.gitkeep !home/user/.config/bash/bashrc.d/.gitkeep
home/user/.config/zsh/zshrc.d/* home/user/.config/zsh/zshrc.d/*
!home/user/.config/zsh/zshrc.d/.gitkeep !home/user/.config/zsh/zshrc.d/00_zhashd.sh
home/user/.config/zsh/.zcalc_history home/user/.config/zsh/.zcalc_history
*.zwc *.zwc

View File

@ -40,6 +40,9 @@ alias wp='cd $WORKING_PROJECT'
alias path='echo -e ${PATH//:/\\n}' alias path='echo -e ${PATH//:/\\n}'
alias dh='dirs -v'
alias pd='popd'
# shorts # shorts
alias c='clear' alias c='clear'
alias h='history 0' alias h='history 0'

View File

@ -275,3 +275,7 @@ bak() {
fi fi
done done
} }
f() {
find . -name "*${1}*"
}

View File

@ -43,7 +43,12 @@ bind-key Y {
} }
bind t display-popup -E -h 70% -w 60% bind t display-popup -E -h 70% -w 60%
bind c clock-mode
bind c display-menu \
calendar c "display-popup -w 33% -h 70% 'cal -y'" \
time t "clock-mode"
# Switch new session # Switch new session

View File

@ -48,3 +48,19 @@ bindkey -M viins '^S' insert-sudo # C-s
bindkey '`' autosuggest-accept bindkey '`' autosuggest-accept
bindkey '^?' backward-delete-char bindkey '^?' backward-delete-char
bindkey '^W' backward-delete-word bindkey '^W' backward-delete-word
popdquiet() {
popd &>/dev/null
zle reset-prompt
}
zle -N popdquiet
bindkey "^P" popdquiet
cddotdot() {
cd ..
zle reset-prompt
}
zle -N cddotdot
bindkey "^O" cddotdot

View File

@ -7,6 +7,10 @@ setopt numericglobsort # sort filenames numerically when it makes sense
setopt promptsubst # enable command substitution in prompt setopt promptsubst # enable command substitution in prompt
setopt noflowcontrol # disable C-s mapping setopt noflowcontrol # disable C-s mapping
DIRSTACKSIZE=8
setopt autopushd
WORDCHARS=${WORDCHARS//\/} # Don't consider certain characters part of the word WORDCHARS=${WORDCHARS//\/} # Don't consider certain characters part of the word
# hide EOL sign ('%') # hide EOL sign ('%')

View File

@ -0,0 +1,3 @@
# Example:
# hash -d pa=~/code/ProcessAgent2
# cd ~pa