yazi: init
This commit is contained in:
parent
50d8845e06
commit
3ac3a823d1
4 changed files with 73 additions and 0 deletions
|
|
@ -109,3 +109,11 @@ plugInstall https://github.com/Aloxaf/fzf-tab fzf-tab.zsh
|
|||
# load fzf and zoxide
|
||||
eval "$(fzf --zsh)"
|
||||
eval "$(zoxide init zsh)"
|
||||
|
||||
function y() {
|
||||
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
|
||||
command yazi "$@" --cwd-file="$tmp"
|
||||
IFS= read -r -d '' cwd < "$tmp"
|
||||
[ -n "$cwd" ] && [ "$cwd" != "$PWD" ] && builtin cd -- "$cwd"
|
||||
command rm -f -- "$tmp"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue