Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
02d12538
Unverified
Commit
02d12538
authored
Mar 03, 2020
by
Marc Cornellà
Committed by
GitHub
Mar 03, 2020
Browse files
lib: clean up termsupport.zsh
parent
d7825313
Changes
1
Show whitespace changes
Inline
Side-by-side
lib/termsupport.zsh
View file @
02d12538
...
...
@@ -50,24 +50,17 @@ fi
# Runs before showing the prompt
function
omz_termsupport_precmd
{
emulate
-L
zsh
if
[[
"
$DISABLE_AUTO_TITLE
"
==
true
]]
;
then
return
fi
[[
"
$DISABLE_AUTO_TITLE
"
==
true
]]
&&
return
title
$ZSH_THEME_TERM_TAB_TITLE_IDLE
$ZSH_THEME_TERM_TITLE_IDLE
}
# Runs before executing the command
function
omz_termsupport_preexec
{
[[
"
$DISABLE_AUTO_TITLE
"
==
true
]]
&&
return
emulate
-L
zsh
setopt extended_glob
if
[[
"
$DISABLE_AUTO_TITLE
"
==
true
]]
;
then
return
fi
# split command into array of arguments
local
-a
cmdargs
cmdargs
=(
"
${
(z)2
}
"
)
...
...
@@ -99,10 +92,9 @@ function omz_termsupport_preexec {
esac
# override preexec function arguments with job command
local
job_cmd
=
"
${
jobtexts
[
$job_id
]
}
"
if
[[
-n
"
$job_cmd
"
]]
;
then
1
=
"
$job_cmd
"
2
=
"
$job_cmd
"
if
[[
-n
"
${
jobtexts
[
$job_id
]
}
"
]]
;
then
1
=
"
${
jobtexts
[
$job_id
]
}
"
2
=
"
${
jobtexts
[
$job_id
]
}
"
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