diff --git a/commonsh/00_helper b/commonsh/00_helper index 8d802e3..e515d0c 100755 --- a/commonsh/00_helper +++ b/commonsh/00_helper @@ -45,7 +45,7 @@ if [ -z "${MANPATH}" ] ; then case `uname -s` in SunOS) # some solaris systems have manpath - if ( command -v manpath >/dev/null 2>&1 ) ; then + if command -v manpath >/dev/null 2>&1 ; then MANPATH=`manpath` export MANPATH else diff --git a/commonsh/02_term b/commonsh/02_term index 84d1a42..500ba13 100755 --- a/commonsh/02_term +++ b/commonsh/02_term @@ -4,7 +4,7 @@ fix_term () { # we were requested to go on screen and we are on a mac - if ( infocmp $1 >/dev/null 2>&1 ) ; then + if infocmp $1 >/dev/null 2>&1 ; then echo $1 else case $1 in @@ -21,7 +21,7 @@ fix_term () fix_term screen-256colors ;; screen-256colors) - if ( infocmp xterm-256colors >/dev/null 2>&1 ) ; then + if infocmp xterm-256colors >/dev/null 2>&1 ; then fix_term xterm-256colors else fix_term screen @@ -52,7 +52,7 @@ fix_terminfo_db () fi } -if ( command -v infocmp >/dev/null 2>&1 ) ; then +if command -v infocmp >/dev/null 2>&1 ; then # terminal surgery case `uname -s` in Interix) @@ -70,7 +70,7 @@ if ( command -v infocmp >/dev/null 2>&1 ) ; then # I am sorry to hear that you are running an # xterm that has no colors (I am looking at you solaris) - if [ $TERM = xterm ] && ( command -v tput >/dev/null 2>&1 ) && [ `tput -T xterm colors` = -1 ] ; then + if [ $TERM = xterm ] && command -v tput >/dev/null 2>&1 && [ `tput -T xterm colors` = -1 ] ; then # lets see what we can do about your terrible term TERM=`fix_term xterm-color` fi diff --git a/commonsh/10_alias b/commonsh/10_alias index ace0355..1e40707 100755 --- a/commonsh/10_alias +++ b/commonsh/10_alias @@ -1,7 +1,7 @@ #! /bin/sh # colors for dircolors in gdircolors dircolors ; do - if ( command -v $dircolors >/dev/null 2>&1 ) ; then + if command -v $dircolors >/dev/null 2>&1 ; then dircolor_text='' if [ -f "${HOME}/.dir_colors" ] ; then dircolor_text=`cat "${HOME}/.dir_colors"` @@ -11,7 +11,7 @@ for dircolors in gdircolors dircolors ; do eval `$dircolors -b /etc/DIR_COLORS` fi - if ( $dircolors --version 2>/dev/null | grep GNU >/dev/null 2>&1 ) ; then + if $dircolors --version 2>/dev/null | grep GNU >/dev/null 2>&1 ; then dircolor_text="${dircolor_text}\nSTICKY_OTHER_WRITABLE 01;04;34;40" dircolor_text="${dircolor_text}\nOTHER_WRITABLE 01;34;40" fi @@ -23,7 +23,7 @@ done # gimmie an editor, make it a nice vi clone for EDITOR in vimx vim elvis vile nvi vi ; do - ( command -v $EDITOR >/dev/null 2>&1 ) && break + command -v $EDITOR >/dev/null 2>&1 && break done export EDITOR @@ -46,13 +46,13 @@ case `uname -s` in alias grep='grep -d skip --color=auto' ;; FreeBSD|Darwin|DragonFly) - if ( command -v top >/dev/null 2>&1 ) ; then + if command -v top >/dev/null 2>&1 ; then alias top="top -o cpu" fi - if ( command -v gls >/dev/null 2>&1 ) ; then + if command -v gls >/dev/null 2>&1 ; then alias ls="gls -h --color=auto" - elif ( ls --version 2>/dev/null | grep GNU >/dev/null 2>&1 ) ; then + elif ls --version 2>/dev/null | grep GNU >/dev/null 2>&1 ; then alias ls="ls -h --color=auto" else LSCOLORS="ExGxFxDxCxDxDxHbaDEaEa" @@ -65,31 +65,31 @@ case `uname -s` in alias ls="ls --color" ;; SunOS) - if ( command -v gls >/dev/null 2>&1 ) ; then + if command -v gls >/dev/null 2>&1 ; then alias ls="gls -h --color=auto" - elif ( ls --version 2>/dev/null | grep GNU >/dev/null 2>&1 ) ; then + elif ls --version 2>/dev/null | grep GNU >/dev/null 2>&1 ; then alias ls="ls -h --color=auto" else alias ls="ls -h" fi - if ( command -v ggrep >/dev/null 2>&1 ) ; then + if command -v ggrep >/dev/null 2>&1 ; then alias grep='ggrep -d skip --color=auto' - elif ( grep --version 2>/dev/null | grep GNU >/dev/null 2>&1 ) ; then + elif grep --version 2>/dev/null | grep GNU >/dev/null 2>&1 ; then alias grep='grep -d skip --color=auto' fi for locate in glocate slocate ; do - ( command -v $locate >/dev/null 2>&1 ) && alias locate=$locate + command -v $locate >/dev/null 2>&1 && alias locate=$locate done ;; esac -if ( command -v gobjdump >/dev/null 2>&1 ) ; then +if command -v gobjdump >/dev/null 2>&1 ; then alias objdump=gobjdump fi -if ( command -v ack-grep >/dev/null 2>&1 ) ; then +if command -v ack-grep >/dev/null 2>&1 ; then alias ack=ack-grep fi @@ -100,4 +100,4 @@ alias du='du -h' alias ping='ping -c4' -( command -v time >/dev/null 2>&1 ) && alias time='command time' +command -v time >/dev/null 2>&1 && alias time='command time' diff --git a/commonsh/10_pager b/commonsh/10_pager index 4713020..d03c0e9 100755 --- a/commonsh/10_pager +++ b/commonsh/10_pager @@ -1,6 +1,6 @@ #! /bin/sh for PAGER in less more pg ; do - ( command -v $PAGER >/dev/null 2>&1 ) && break + command -v $PAGER >/dev/null 2>&1 && break done export PAGER diff --git a/commonsh/10_rlwrap b/commonsh/10_rlwrap index 1314fff..1eda987 100755 --- a/commonsh/10_rlwrap +++ b/commonsh/10_rlwrap @@ -1,4 +1,4 @@ #! /bin/sh for wrap in rlwrap rlfe cle ; do - ( command -v $wrap >/dev/null 2>&1 ) && alias ocaml="$wrap ocaml" && break + command -v $wrap >/dev/null 2>&1 && alias ocaml="$wrap ocaml" && break done diff --git a/commonsh/10_utility b/commonsh/10_utility index e6b97ea..329b10c 100755 --- a/commonsh/10_utility +++ b/commonsh/10_utility @@ -14,13 +14,13 @@ err () E*) errconst=$1 unset errno - if [ "${errno}" = "" ] && ( command -v python > /dev/null 2>&1 ); then + if [ "${errno}" = "" ] && command -v python > /dev/null 2>&1 ; then errno=`python -c "import errno;print(errno.${errconst})" 2>/dev/null` fi - if [ "${errno}" = "" ] && ( command -v perl > /dev/null 2>&1 ); then + if [ "${errno}" = "" ] && command -v perl > /dev/null 2>&1 ; then errno=`perl -MErrno -e "print &Errno::${errconst}.\"\n\";" 2>/dev/null` fi - if [ "${errno}" = "" ] && ( command -v ruby > /dev/null 2>&1 ); then + if [ "${errno}" = "" ] && command -v ruby > /dev/null 2>&1 ; then errno=`ruby -e "puts Errno::${errconst}::Errno" 2>/dev/null` fi if [ "${errno}" = "" ] && [ -e /usr/include/errno.h ] ; then @@ -36,10 +36,10 @@ err () *) errno=$1 unset errconst - if [ "${errconst}" = "" ] && ( command -v ruby > /dev/null 2>&1 ); then + if [ "${errconst}" = "" ] && command -v ruby > /dev/null 2>&1 ; then errconst=`ruby -e "puts Errno.constants.find_all{|err| eval('Errno::' + err + '::Errno') == ${errno} }" 2>/dev/null` fi - if [ "${errconst}" = "" ] && ( command -v python > /dev/null 2>&1 ); then + if [ "${errconst}" = "" ] && command -v python > /dev/null 2>&1 ; then errconst=`python -c "import errno;print(errno.errorcode[${errno}])" 2>/dev/null` fi if [ "${errconst}" ] ; then @@ -58,10 +58,10 @@ err () esac unset errstr - if [ "${errstr}" = "" ] && ( command -v perl > /dev/null 2>&1 ) ; then + if [ "${errstr}" = "" ] && command -v perl > /dev/null 2>&1 ; then errstr=`perl -MPOSIX -e 'print strerror($ARGV[0])."\n";' $errno` fi - if [ "${errstr}" = "" ] && ( command -v python > /dev/null 2>&1 ) ; then + if [ "${errstr}" = "" ] && command -v python > /dev/null 2>&1 ; then errstr=`python -c "import os;print(os.strerror($errno))" 2>/dev/null` fi @@ -89,7 +89,7 @@ extract () return fi - if ( command -v aunpack > /dev/null 2>&1 ) ; then + if command -v aunpack > /dev/null 2>&1 ; then aunpack "${1}" return fi diff --git a/zsh/00_options b/zsh/00_options index ea693b8..11252bc 100755 --- a/zsh/00_options +++ b/zsh/00_options @@ -2,7 +2,7 @@ WORDCHARS='' # disable core dumps -if ( ulimit -c >/dev/null 2>&1 ) ; then +if ulimit -c >/dev/null 2>&1 ; then ulimit -c 0 fi diff --git a/zsh/prompt b/zsh/prompt index e1e2e92..b2613ef 100755 --- a/zsh/prompt +++ b/zsh/prompt @@ -21,7 +21,7 @@ case "${TERM}" in dumb) ;; *) - if ( command -v tput >/dev/null 2>&1 ) && [ `tput colors` != -1 ] ; then + if command -v tput >/dev/null 2>&1 && [ `tput colors` != -1 ] ; then RESETCOLOR=$'%{\e[00;00m%}' if [ -z "${SSH_TTY}" ] ; then HOSTCOLOR=$'%{\e[01;32m%}'