Browse Source

Added missing parenthesis to a few functions.

master
Sorin Ionescu 13 years ago
parent
commit
f000d7e39f
  1. 4
      helper.zsh
  2. 4
      terminal.zsh

4
helper.zsh

@ -4,7 +4,7 @@ function autoloadable() { @@ -4,7 +4,7 @@ function autoloadable() {
}
# Checks boolean variable for "true" (case insensitive "1", "y", "yes", "t", "true", "o", and "on").
function check-bool {
function check-bool() {
[[ -n "$1" && "$1" == (1|[Yy]([Ee][Ss]|)|[Tt]([Rr][Uu][Ee]|)|[Oo]([Nn]|)) ]]
}
@ -17,7 +17,7 @@ TRAP_SIGNALS=( @@ -17,7 +17,7 @@ TRAP_SIGNALS=(
)
# Adds a function to a list to be called when a trap is triggered.
function add-zsh-trap {
function add-zsh-trap() {
if (( $# < 2 )); then
print "Usage: $0 type function"
return 1

4
terminal.zsh

@ -69,7 +69,7 @@ function set-title-by-command() { @@ -69,7 +69,7 @@ function set-title-by-command() {
autoload -Uz add-zsh-hook
# Sets the tab and window titles before the prompt is displayed.
function set-title-precmd {
function set-title-precmd() {
if [[ "$TERM_PROGRAM" != "Apple_Terminal" ]] && zstyle -t ':omz:terminal' auto-title; then
set-window-title "${(%):-%~}"
for kind in tab screen; do
@ -84,7 +84,7 @@ function set-title-precmd { @@ -84,7 +84,7 @@ function set-title-precmd {
add-zsh-hook precmd set-title-precmd
# Sets the tab and window titles before command execution.
function set-title-preexec {
function set-title-preexec() {
if zstyle -t ':omz:terminal' auto-title; then
set-title-by-command "$2"
fi

Loading…
Cancel
Save