update `.bashrc`
parent
c41d32c454
commit
4e63f0a0cd
17
.bashrc
17
.bashrc
|
@ -44,20 +44,3 @@ if ! shopt -oq posix; then
|
|||
. /etc/bash_completion
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue