tell Terminal.app what directory I'm in
This commit is contained in:
parent
8fc2df426b
commit
1f756fc240
1 changed files with 12 additions and 0 deletions
12
zsh/zshrc
12
zsh/zshrc
|
|
@ -63,6 +63,18 @@ else
|
||||||
export VISUAL="vi"
|
export VISUAL="vi"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set Apple Terminal.app resume directory
|
||||||
|
if [[ $TERM_PROGRAM == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]] {
|
||||||
|
function chpwd {
|
||||||
|
local SEARCH=' '
|
||||||
|
local REPLACE='%20'
|
||||||
|
local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}"
|
||||||
|
printf '\e]7;%s\a' "$PWD_URL"
|
||||||
|
}
|
||||||
|
|
||||||
|
chpwd
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# 2. Limits
|
# 2. Limits
|
||||||
# =========
|
# =========
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue