Update: 2024-10-17

This commit is contained in:
2024-10-17 12:43:48 +03:00
parent eae6ecaebb
commit e2c877478c
68 changed files with 3579 additions and 1056 deletions

View File

@@ -91,16 +91,14 @@ lfcd() {
fi
}
yazicd() {
tmp="$(mktemp -uq)"
trap 'rm -f $tmp >/dev/null 2>&1 && trap - HUP INT QUIT TERM PWR EXIT' HUP INT QUIT TERM PWR EXIT
yazi "$@" --cwd-file="$tmp"
if [ -f "$tmp" ]; then
dir="$(cat "$tmp")"
[ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir" || return
fi
function yazicd() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")"
yazi "$@" --cwd-file="$tmp"
if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
builtin cd -- "$cwd"
fi
rm -f -- "$tmp"
}
tmux-window-name() {
($TMUX_PLUGIN_MANAGER_PATH/tmux-window-name/scripts/rename_session_windows.py &)
}