mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-01 04:30:37 +02:00
add custom tab title cmd ignore pattern support
This commit is contained in:
parent
26aae6b583
commit
e2703db383
1 changed files with 5 additions and 1 deletions
|
|
@ -68,8 +68,12 @@ function omz_termsupport_preexec {
|
|||
return
|
||||
fi
|
||||
|
||||
local cmd_ignore_pattern="*=*|sudo|ssh|mosh|rake|-*"
|
||||
if [[ -n "$TABTITLE_CUSTOM_IGNORE_PATTERN" ]]; then
|
||||
cmd_ignore_pattern="$cmd_ignore_pattern|$TABTITLE_CUSTOM_IGNORE_PATTERN"
|
||||
fi
|
||||
# cmd name only, or if this is sudo or ssh, the next cmd
|
||||
local CMD=${1[(wr)^(*=*|sudo|ssh|mosh|rake|-*)]:gs/%/%%}
|
||||
local CMD=${1[(wr)^($cmd_ignore_pattern)]:gs/%/%%}
|
||||
local LINE="${2:gs/%/%%}"
|
||||
|
||||
title '$CMD' '%100>...>$LINE%<<'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue