diff --git a/lib/completion.zsh b/lib/completion.zsh index faea36118..83b6efb66 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -25,7 +25,7 @@ bindkey -M menuselect '^o' accept-and-infer-next-history zstyle ':completion:*:*:*:*:*' menu select zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01' -if [ "$PLAT" = "SunOS" ] +if [ "$OSTYPE[0,7]" = "solaris" ] then zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm" else diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 4683c2bc0..c217b91bb 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -1,4 +1,3 @@ -PLAT=`uname -s` # Check for updates on initial load... if [ "$DISABLE_AUTO_UPDATE" != "true" ]; then /usr/bin/env ZSH=$ZSH DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT zsh -f $ZSH/tools/check_for_upgrade.sh diff --git a/plugins/colored-man/colored-man.plugin.zsh b/plugins/colored-man/colored-man.plugin.zsh index 4956f4346..5c613f49d 100644 --- a/plugins/colored-man/colored-man.plugin.zsh +++ b/plugins/colored-man/colored-man.plugin.zsh @@ -1,4 +1,4 @@ -if [ "${PLAT}" = "SunOS" ] +if [ "$OSTYPE[0,7]" = "solaris" ] then if [ ! -x ${HOME}/bin/nroff ] then diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 1aba9a272..0e8845ab4 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -1,13 +1,9 @@ -#!/bin/sh +#!/usr/bin/env zsh + +zmodload zsh/datetime -PLAT=`uname -s` function _current_epoch() { - if [ "$PLAT" = "SunOS" ] - then - echo $(($(perl -e 'print time') / 60 / 60 / 24)) - else - echo $(($(date +%s) / 60 / 60 / 24)) - fi + echo $EPOCHSECONDS } function _update_zsh_update() {