diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-11-10 09:59:32 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-11-10 09:59:32 +0900 |
| commit | 9afdf8d6cf4d945ac764654af75555fc767fb565 (patch) | |
| tree | 54b9a624185ddcbff720e44517f9cdcea1f35582 /ar/.config/zsh/scripts.zsh | |
| parent | 38ec0c05c59332fbe5527ccb023ac6044fafcccd (diff) | |
modified zsh/.zshrc, modified zsh/keymaps.zsh, modified zsh/scripts.zsh
Diffstat (limited to 'ar/.config/zsh/scripts.zsh')
| -rw-r--r-- | ar/.config/zsh/scripts.zsh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ar/.config/zsh/scripts.zsh b/ar/.config/zsh/scripts.zsh index e3364e8..92e10c6 100644 --- a/ar/.config/zsh/scripts.zsh +++ b/ar/.config/zsh/scripts.zsh @@ -865,3 +865,16 @@ function delete_venv() { echo "$venv deleted" fi } + + +########################################################################################### +########################################################################################### +### --- YAZI --- ### +# open yazi and cd to the file path +function yazicd() { + local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd + yazi "$@" --cwd-file="$tmp" + IFS= read -r -d '' cwd < "$tmp" + [ -n "$cwd" ] && [ "$cwd" != "$PWD" ] && builtin cd -- "$cwd" + rm -f -- "$tmp" +} |
