mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-07-01 10:29:25 +00:00
[Fix #301] Unset $MATCH after use
This commit is contained in:
@ -68,6 +68,7 @@ function set-titles-with-command {
|
||||
# Set the command name, or in the case of sudo or ssh, the next command.
|
||||
local cmd=${${1[(wr)^(*=*|sudo|ssh|-*)]}:t}
|
||||
local truncated_cmd="${cmd/(#m)?(#c15,)/${MATCH[1,12]}...}"
|
||||
unset MATCH
|
||||
|
||||
if [[ "$TERM" == screen* ]]; then
|
||||
set-screen-window-title "$truncated_cmd"
|
||||
@ -90,6 +91,7 @@ function set-titles-with-path {
|
||||
else
|
||||
local abbreviated_path="${absolute_path/#$HOME/~}"
|
||||
local truncated_path="${abbreviated_path/(#m)?(#c15,)/...${MATCH[-12,-1]}}"
|
||||
unset MATCH
|
||||
|
||||
if [[ "$TERM" == screen* ]]; then
|
||||
set-screen-window-title "$truncated_path"
|
||||
|
Reference in New Issue
Block a user