diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/functions.zsh | 10 | ||||
-rw-r--r-- | lib/termsupport.zsh | 4 |
2 files changed, 9 insertions, 5 deletions
diff --git a/lib/functions.zsh b/lib/functions.zsh index ec6f37214..f9d4a9717 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -16,13 +16,17 @@ function take() { } function open_command() { + emulate -L zsh + setopt shwordsplit + local open_cmd # define the open command case "$OSTYPE" in - darwin*) open_cmd="open" ;; - cygwin*) open_cmd="cygstart" ;; - linux*) open_cmd="xdg-open" ;; + darwin*) open_cmd='open' ;; + cygwin*) open_cmd='cygstart' ;; + linux*) open_cmd='xdg-open' ;; + msys*) open_cmd='start ""' ;; *) echo "Platform $OSTYPE not supported" return 1 ;; diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 4c5068e9b..f11a7dd18 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -9,7 +9,7 @@ function title { emulate -L zsh setopt prompt_subst - + [[ "$EMACS" == *term* ]] && return # if $2 is unset use $1 as default @@ -18,7 +18,7 @@ function title { if [[ "$TERM" == screen* ]]; then print -Pn "\ek$1:q\e\\" #set screen hardstatus, usually truncated at 20 chars - elif [[ "$TERM" == xterm* ]] || [[ "$TERM" == rxvt* ]] || [[ "$TERM" == ansi ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then + elif [[ "$TERM" == xterm* ]] || [[ "$TERM" == putty* ]] || [[ "$TERM" == rxvt* ]] || [[ "$TERM" == ansi ]] || [[ "$TERM" == cygwin ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then print -Pn "\e]2;$2:q\a" #set window name print -Pn "\e]1;$1:q\a" #set icon (=tab) name fi |