mirror of
https://github.com/lloeki/dotfiles.git
synced 2025-12-06 07:24:39 +01:00
support for Lion Terminal working directory handling
This commit is contained in:
parent
989a311081
commit
00295a6199
1 changed files with 18 additions and 0 deletions
18
zshrc
18
zshrc
|
|
@ -4,6 +4,24 @@ autoload -Uz promptinit
|
||||||
promptinit
|
promptinit
|
||||||
prompt walters
|
prompt walters
|
||||||
|
|
||||||
|
# Set up working dir change event
|
||||||
|
chpwd() {
|
||||||
|
[[ -o interactive ]] || return
|
||||||
|
# Bubble information up to the terminal
|
||||||
|
case $TERM_PROGRAM in
|
||||||
|
Apple_Terminal)
|
||||||
|
local SEARCH=' '
|
||||||
|
local REPLACE='%20'
|
||||||
|
local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}"
|
||||||
|
printf '\e]7;%s\a' "$PWD_URL"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# NOOP
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
chpwd # call in right now
|
||||||
|
|
||||||
# Use emacs keybindings even if our EDITOR is set to vi
|
# Use emacs keybindings even if our EDITOR is set to vi
|
||||||
bindkey -e
|
bindkey -e
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue