mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-19 21:41:07 +01:00
Apple Terminal.app resume directory plugin
This commit is contained in:
parent
8c45b73918
commit
a28b8889ee
1 changed files with 11 additions and 0 deletions
11
plugins/terminalapp/terminalapp.plugin.zsh
Normal file
11
plugins/terminalapp/terminalapp.plugin.zsh
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Set Apple Terminal.app resume directory
|
||||
# based on this answer: http://superuser.com/a/315029
|
||||
|
||||
function chpwd {
|
||||
local SEARCH=' '
|
||||
local REPLACE='%20'
|
||||
local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}"
|
||||
printf '\e]7;%s\a' "$PWD_URL"
|
||||
}
|
||||
|
||||
chpwd
|
Loading…
Reference in a new issue