diff --git a/packages.yml b/packages.yml index beb976f..7661298 100644 --- a/packages.yml +++ b/packages.yml @@ -574,3 +574,17 @@ pulumi: reflector: archlinux: - reflector +yazi: + archlinux: + - yazi + - ffmpeg + - 7zip + - jq + - poppler + - fd + - ripgrep + - fzf + - xsel + - zoxide + - resvg + - imagemagick diff --git a/zsh/zshrc.j2 b/zsh/zshrc.j2 index 6e681c4..c89a707 100644 --- a/zsh/zshrc.j2 +++ b/zsh/zshrc.j2 @@ -379,6 +379,16 @@ tmp() { fi } +# taken verbatim from https://yazi-rs.github.io/docs/quick-start, extended with "command" in +# the last line to not use aliased `rm` +function y() { + 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" + command rm -f -- "$tmp" +} + setopt PROMPT_SUBST autoload -Uz vcs_info