.bashrc upd
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user