.bashrc upd

This commit is contained in:
2026-08-26 17:39:06 +02:00
parent 04a09b419d
commit 3c84bebbd7

View File

@@ -206,6 +206,15 @@ ssh() {
) )
} }
# Yazi
function y() {
local tmp cwd; tmp="$(mktemp -t "yazi-cwd.XXXXXX")"
command yazi "$@" --cwd-file="$tmp"
IFS= read -r -d '' cwd < "$tmp"
[ "$cwd" != "$PWD" ] && [ -d "$cwd" ] && builtin cd -- "$cwd" || builtin true
command rm -f -- "$tmp"
}
# Git prompt # Git prompt
if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then
GIT_PROMPT_ONLY_IN_REPO=1 GIT_PROMPT_ONLY_IN_REPO=1