mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-06 02:51:32 +01:00
Update dircycle.plugin.zsh
Added dirhistory-like go up a directory (insert-cycledup) and go down to first child directory (insert-cycleddown).
This commit is contained in:
parent
0fed36688f
commit
5b217eea49
1 changed files with 21 additions and 0 deletions
|
|
@ -43,6 +43,27 @@ insert-cycledright () {
|
||||||
}
|
}
|
||||||
zle -N insert-cycledright
|
zle -N insert-cycledright
|
||||||
|
|
||||||
|
insert-cycledup () {
|
||||||
|
switch-to-dir .. || return
|
||||||
|
|
||||||
|
local fn
|
||||||
|
for fn (chpwd $chpwd_functions precmd $precmd_functions); do
|
||||||
|
(( $+functions[$fn] )) && $fn
|
||||||
|
done
|
||||||
|
zle reset-prompt
|
||||||
|
}
|
||||||
|
zle -N insert-cycledup
|
||||||
|
|
||||||
|
insert-cycleddown () {
|
||||||
|
switch-to-dir "$(find . -mindepth 1 -maxdepth 1 -type d | sort -n | head -n 1)" || return
|
||||||
|
|
||||||
|
local fn
|
||||||
|
for fn (chpwd $chpwd_functions precmd $precmd_functions); do
|
||||||
|
(( $+functions[$fn] )) && $fn
|
||||||
|
done
|
||||||
|
zle reset-prompt
|
||||||
|
}
|
||||||
|
zle -N insert-cycleddown
|
||||||
|
|
||||||
# These sequences work for xterm, Apple Terminal.app, and probably others.
|
# These sequences work for xterm, Apple Terminal.app, and probably others.
|
||||||
# Not for rxvt-unicode, but it doesn't seem differentiate Ctrl-Shift-Arrow
|
# Not for rxvt-unicode, but it doesn't seem differentiate Ctrl-Shift-Arrow
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue