Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
5ee54032
Commit
5ee54032
authored
Feb 13, 2015
by
Robby Russell
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3572 from mcornella/fix-apple_terminal-newtab-again
Extract CWD notifier back out of auto-title hooks
parents
ef7e53a7
3704fbb7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
termsupport.zsh
lib/termsupport.zsh
+13
-7
No files found.
lib/termsupport.zsh
View file @
5ee54032
...
@@ -31,13 +31,6 @@ function omz_termsupport_precmd {
...
@@ -31,13 +31,6 @@ function omz_termsupport_precmd {
fi
fi
title
$ZSH_THEME_TERM_TAB_TITLE_IDLE
$ZSH_THEME_TERM_TITLE_IDLE
title
$ZSH_THEME_TERM_TAB_TITLE_IDLE
$ZSH_THEME_TERM_TITLE_IDLE
# Notify Terminal.app of current directory using undocumented OSC sequence
# found in OS X 10.9 and 10.10's /etc/bashrc
if
[[
$TERM_PROGRAM
==
Apple_Terminal
]]
&&
[[
-z
$INSIDE_EMACS
]]
;
then
local
PWD_URL
=
"file://
$HOSTNAME
${
PWD
// /%20
}
"
printf
'\e]7;%s\a'
"
$PWD_URL
"
fi
}
}
# Runs before executing the command
# Runs before executing the command
...
@@ -58,3 +51,16 @@ function omz_termsupport_preexec {
...
@@ -58,3 +51,16 @@ function omz_termsupport_preexec {
precmd_functions+
=(
omz_termsupport_precmd
)
precmd_functions+
=(
omz_termsupport_precmd
)
preexec_functions+
=(
omz_termsupport_preexec
)
preexec_functions+
=(
omz_termsupport_preexec
)
# Runs before showing the prompt, to update the current directory in Terminal.app
function
omz_termsupport_cwd
{
# Notify Terminal.app of current directory using undocumented OSC sequence
# found in OS X 10.9 and 10.10's /etc/bashrc
if
[[
$TERM_PROGRAM
==
Apple_Terminal
]]
&&
[[
-z
$INSIDE_EMACS
]]
;
then
local
PWD_URL
=
"file://
$HOSTNAME
${
PWD
// /%20
}
"
printf
'\e]7;%s\a'
"
$PWD_URL
"
fi
}
precmd_functions+
=(
omz_termsupport_cwd
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment