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
02d12538
Unverified
Commit
02d12538
authored
Mar 03, 2020
by
Marc Cornellà
Committed by
GitHub
Mar 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib: clean up termsupport.zsh
parent
d7825313
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
18 deletions
+10
-18
termsupport.zsh
lib/termsupport.zsh
+10
-18
No files found.
lib/termsupport.zsh
View file @
02d12538
...
@@ -50,24 +50,17 @@ fi
...
@@ -50,24 +50,17 @@ fi
# Runs before showing the prompt
# Runs before showing the prompt
function
omz_termsupport_precmd
{
function
omz_termsupport_precmd
{
emulate
-L
zsh
[[
"
$DISABLE_AUTO_TITLE
"
==
true
]]
&&
return
if
[[
"
$DISABLE_AUTO_TITLE
"
==
true
]]
;
then
return
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
}
}
# Runs before executing the command
# Runs before executing the command
function
omz_termsupport_preexec
{
function
omz_termsupport_preexec
{
[[
"
$DISABLE_AUTO_TITLE
"
==
true
]]
&&
return
emulate
-L
zsh
emulate
-L
zsh
setopt extended_glob
setopt extended_glob
if
[[
"
$DISABLE_AUTO_TITLE
"
==
true
]]
;
then
return
fi
# split command into array of arguments
# split command into array of arguments
local
-a
cmdargs
local
-a
cmdargs
cmdargs
=(
"
${
(z)2
}
"
)
cmdargs
=(
"
${
(z)2
}
"
)
...
@@ -99,10 +92,9 @@ function omz_termsupport_preexec {
...
@@ -99,10 +92,9 @@ function omz_termsupport_preexec {
esac
esac
# override preexec function arguments with job command
# override preexec function arguments with job command
local
job_cmd
=
"
${
jobtexts
[
$job_id
]
}
"
if
[[
-n
"
${
jobtexts
[
$job_id
]
}
"
]]
;
then
if
[[
-n
"
$job_cmd
"
]]
;
then
1
=
"
${
jobtexts
[
$job_id
]
}
"
1
=
"
$job_cmd
"
2
=
"
${
jobtexts
[
$job_id
]
}
"
2
=
"
$job_cmd
"
fi
fi
fi
fi
...
...
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