mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-17 04:29:14 +02:00
Fix #2416 in terminalapp plugin
This commit is contained in:
parent
5728a5608d
commit
c34221e821
1 changed files with 37 additions and 30 deletions
|
|
@ -2,8 +2,12 @@
|
||||||
# based on this answer: http://superuser.com/a/315029
|
# based on this answer: http://superuser.com/a/315029
|
||||||
# 2012-10-26: (javageek) Changed code using the updated answer
|
# 2012-10-26: (javageek) Changed code using the updated answer
|
||||||
|
|
||||||
# Tell the terminal about the working directory whenever it changes.
|
# Run only on OS X < 10.9 because the whole functionality has been replaced by Mavericks natively.
|
||||||
if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then
|
# https://github.com/robbyrussell/oh-my-zsh/issues/2416
|
||||||
|
if [[ "$(uname)" == "Darwin" ]] && [[ "$(uname -r | cut -d . -f 1)" -lt 13 ]]; then
|
||||||
|
|
||||||
|
# Tell the terminal about the working directory whenever it changes.
|
||||||
|
if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then
|
||||||
update_terminal_cwd() {
|
update_terminal_cwd() {
|
||||||
# Identify the directory using a "file:" scheme URL, including
|
# Identify the directory using a "file:" scheme URL, including
|
||||||
# the host name to disambiguate local vs. remote paths.
|
# the host name to disambiguate local vs. remote paths.
|
||||||
|
|
@ -36,4 +40,7 @@ if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then
|
||||||
|
|
||||||
# Tell the terminal about the initial directory.
|
# Tell the terminal about the initial directory.
|
||||||
update_terminal_cwd
|
update_terminal_cwd
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue