summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAndrew Janke <janke@pobox.com>2015-02-14 19:05:27 -0500
committerAndrew Janke <janke@pobox.com>2015-02-14 19:05:27 -0500
commita9e97e5d2da90cf3e2b4575888fe585972ebcc74 (patch)
treeefa4c93ae62ccb626c17794fcc513aa4e98cb4f5 /plugins
parent5ee54032da9e5f9c5bd96dae877fbf6e08ad7af6 (diff)
downloadzsh-a9e97e5d2da90cf3e2b4575888fe585972ebcc74.tar.gz
zsh-a9e97e5d2da90cf3e2b4575888fe585972ebcc74.tar.bz2
zsh-a9e97e5d2da90cf3e2b4575888fe585972ebcc74.zip
Remove terminalapp plugin and fold its implementation in to lib/termsupport.zsh. Replaces the redundant Terminal.app support that was recently added to termsupport.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/terminalapp/terminalapp.plugin.zsh39
1 files changed, 0 insertions, 39 deletions
diff --git a/plugins/terminalapp/terminalapp.plugin.zsh b/plugins/terminalapp/terminalapp.plugin.zsh
deleted file mode 100644
index 6e47ee188..000000000
--- a/plugins/terminalapp/terminalapp.plugin.zsh
+++ /dev/null
@@ -1,39 +0,0 @@
-# Set Apple Terminal.app resume directory
-# based on this answer: http://superuser.com/a/315029
-# 2012-10-26: (javageek) Changed code using the updated answer
-
-# Tell the terminal about the working directory whenever it changes.
-if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then
- update_terminal_cwd() {
- # Identify the directory using a "file:" scheme URL, including
- # the host name to disambiguate local vs. remote paths.
-
- # Percent-encode the pathname.
- local URL_PATH=''
- {
- # Use LANG=C to process text byte-by-byte.
- local i ch hexch LANG=C
- for ((i = 1; i <= ${#PWD}; ++i)); do
- ch="$PWD[i]"
- if [[ "$ch" =~ [/._~A-Za-z0-9-] ]]; then
- URL_PATH+="$ch"
- else
- hexch=$(printf "%02X" "'$ch")
- URL_PATH+="%$hexch"
- fi
- done
- }
-
- local PWD_URL="file://$HOST$URL_PATH"
- #echo "$PWD_URL" # testing
- printf '\e]7;%s\a' "$PWD_URL"
- }
-
- # Register the function so it is called whenever the working
- # directory changes.
- autoload add-zsh-hook
- add-zsh-hook precmd update_terminal_cwd
-
- # Tell the terminal about the initial directory.
- update_terminal_cwd
-fi