1
0
Fork 0

update `.bashrc`

padova
urosm 2024-05-06 22:11:19 +00:00
parent c41d32c454
commit 4e63f0a0cd
1 changed files with 0 additions and 17 deletions

17
.bashrc
View File

@ -44,20 +44,3 @@ if ! shopt -oq posix; then
. /etc/bash_completion . /etc/bash_completion
fi fi
fi fi
# osc7
osc7_cwd() {
local strlen=${#PWD}
local encoded=""
local pos c o
for (( pos=0; pos<strlen; pos++ )); do
c=${PWD:$pos:1}
case "$c" in
[-/:_.!\'\(\)~[:alnum:]] ) o="${c}" ;;
* ) printf -v o '%%%02X' "'${c}" ;;
esac
encoded+="${o}"
done
printf '\e]7;file://%s%s\e\\' "${HOSTNAME}" "${encoded}"
}
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND}osc7_cwd