add y function for yazi; update lock
This commit is contained in:
@@ -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
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user