diff options
Diffstat (limited to 'mac')
| -rw-r--r-- | mac/.config/yazi/theme.toml | 4 | ||||
| -rw-r--r-- | mac/.config/zsh/scripts.zsh | 14 |
2 files changed, 8 insertions, 10 deletions
diff --git a/mac/.config/yazi/theme.toml b/mac/.config/yazi/theme.toml index 503e6e4..efcc789 100644 --- a/mac/.config/yazi/theme.toml +++ b/mac/.config/yazi/theme.toml @@ -233,8 +233,8 @@ rules = [ { name = "*", is = "exec", fg = "#9ccfd8" }, # Symlink fallback - { name = "*", is = "link", fg = "#b5e6ee", italic = true }, - { name = "*/", is = "link", fg = "#6bd3ee", italic = true }, + # { name = "*", is = "link", fg = "#b5e6ee", italic = true }, + # { name = "*/", is = "link", fg = "#6bd3ee", italic = true }, # Dummy files { name = "*", is = "dummy", fg = "#232136", bg = "#eb6f92" }, diff --git a/mac/.config/zsh/scripts.zsh b/mac/.config/zsh/scripts.zsh index a90bca5..5443b4c 100644 --- a/mac/.config/zsh/scripts.zsh +++ b/mac/.config/zsh/scripts.zsh @@ -870,12 +870,10 @@ function delete_venv() { ########################################################################################### ### --- YAZI --- ### # open yazi and cd to the file path -function yazicd () { - tmp="$(mktemp -uq)" - trap 'rm -f $tmp >/dev/null 2>&1 && trap - HUP INT QUIT TERM EXIT' HUP INT QUIT TERM EXIT - yazi --cwd-file="$tmp" "$@" - if [ -f "$tmp" ]; then - dir="$(cat "$tmp")" - [ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir" - fi +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" } |
