From a9e97e5d2da90cf3e2b4575888fe585972ebcc74 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Sat, 14 Feb 2015 19:05:27 -0500 Subject: Remove terminalapp plugin and fold its implementation in to lib/termsupport.zsh. Replaces the redundant Terminal.app support that was recently added to termsupport. --- plugins/terminalapp/terminalapp.plugin.zsh | 39 ------------------------------ 1 file changed, 39 deletions(-) delete mode 100644 plugins/terminalapp/terminalapp.plugin.zsh (limited to 'plugins/terminalapp') 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 -- cgit v1.2.3-70-g09d2 From 96c34cebae5da3a52e7da0d61188c1f9822a9c2e Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Sun, 9 Aug 2015 16:37:12 -0400 Subject: Add a deprecation comment. --- lib/functions.zsh | 2 -- plugins/terminalapp/terminalapp.plugin.zsh | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 plugins/terminalapp/terminalapp.plugin.zsh (limited to 'plugins/terminalapp') diff --git a/lib/functions.zsh b/lib/functions.zsh index 5c1a5a283..2a962669c 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -176,7 +176,6 @@ function omz_urldecode { emulate -L zsh local encoded_url=$1 - echo -e input $1 # Work bytewise, since URLs escape UTF-8 octets local caller_encoding=$langinfo[CODESET] local LC_ALL=C @@ -188,7 +187,6 @@ function omz_urldecode { tmp=${tmp:gs/\\/\\\\/} # Handle %-escapes by turning them into `\xXX` printf escapes tmp=${tmp:gs/%/\\x/} - echo -E "before decode $tmp" local decoded eval "decoded=\$'$tmp'" diff --git a/plugins/terminalapp/terminalapp.plugin.zsh b/plugins/terminalapp/terminalapp.plugin.zsh new file mode 100644 index 000000000..7c0c278b9 --- /dev/null +++ b/plugins/terminalapp/terminalapp.plugin.zsh @@ -0,0 +1,6 @@ +# This file is intentionally empty. +# +# The terminalapp plugin is deprecated and may be removed in a future release. +# Its functionality has been folded in to the core lib/termsupport.zsh, which +# is loaded for all users. You can remove terminalapp from your $plugins list +# once all your systems are updated to the current version of Oh My Zsh. -- cgit v1.2.3-70-g09d2