add y function for yazi; update lock

This commit is contained in:
2025-01-24 11:27:08 +00:00
parent ce84616e1c
commit ec307680fa
2 changed files with 14 additions and 6 deletions

View File

@@ -36,6 +36,14 @@ with lib;
bash = {
enable = true;
bashrcExtra = ''
function y() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
yazi "$@" --cwd-file="$tmp"
if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
builtin cd -- "$cwd"
fi
rm -f -- "$tmp"
}
source $(blesh-share)/ble.sh
bleopt canvas_winch_action=redraw-prev
'';