mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-07-01 20:59:26 +00:00
Rewrite terminal auto-title
This commit is contained in:
@ -11,6 +11,8 @@ Functions
|
||||
- `is-autoloadable` checks if a file can be autoloaded by trying to load it
|
||||
in a subshell.
|
||||
- `is-callable` checks if a name is a command, function, or alias.
|
||||
- `is-terminal-inside-multiplexer` checks if the currently running terminal is
|
||||
inside a terminal multiplexer.
|
||||
- `is-true` checks a boolean variable for "true".
|
||||
- `coalesce` prints the first non-empty string in the arguments array.
|
||||
|
||||
|
@ -21,6 +21,11 @@ function is-true {
|
||||
[[ -n "$1" && "$1" == (1|[Yy]([Ee][Ss]|)|[Tt]([Rr][Uu][Ee]|)|[Oo]([Nn]|)) ]]
|
||||
}
|
||||
|
||||
# Checks if the currently running terminal is inside a terminal multiplexer.
|
||||
function is-terminal-inside-multiplexer {
|
||||
[[ -n "$STY" || -n "$TMUX" || -n "$DVTM" ]]
|
||||
}
|
||||
|
||||
# Prints the first non-empty string in the arguments array.
|
||||
function coalesce {
|
||||
for arg in $argv; do
|
||||
|
Reference in New Issue
Block a user