L2 Cache

Behold the power of |!

User Tools

Site Tools


configuration:zsh

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
configuration:zsh [2016/06/21 22:01]
sjorge [.zshrc]
configuration:zsh [2017/05/01 18:31]
sjorge [.zshrc]
Line 43: Line 43:
 # #
 # Change Log # Change Log
 +# - 20170501: --- - disabled auto update
 +# - 20160621: --- - optimizations
 # - 20160621: fix - if .aliases is missing initial exit indicator was fasle # - 20160621: fix - if .aliases is missing initial exit indicator was fasle
 # - 20160320: fix - color ls on SmartOS, drop obd support # - 20160320: fix - color ls on SmartOS, drop obd support
Line 85: Line 87:
 # {{{ updater # {{{ updater
     NZSHRC="​https://​docu.blackdot.be/​getRaw.php?​onlyCode=true&​id=configuration:​zsh"​     NZSHRC="​https://​docu.blackdot.be/​getRaw.php?​onlyCode=true&​id=configuration:​zsh"​
-    CHECK_UPDATE=1 +    CHECK_UPDATE=0 
-    AUTO_UPDATE=1+    AUTO_UPDATE=0
 # }}} # }}}
  
Line 297: Line 299:
   ​   ​
         # LX BrandZ         # LX BrandZ
-        [ -d /native/​usr/​bin ​&& ​export PATH=$PATH:/​native/​usr/​bin +        ​if [ -d /native ]; then 
-        [ -d /​native/​sbin ] && [[ -n $WANT_SBIN ]] && ​export PATH=$PATH:/​native/​sbin +            ​export PATH=$PATH:/​native/​usr/​bin 
-        [ -d /​native/​usr/​sbin ] && [[ -n $WANT_SBIN ]] && ​export PATH=$PATH:/​native/​usr/​sbin+            ​if ​[ -n $WANT_SBIN ]; then 
 +                ​export PATH=$PATH:/​native/​sbin 
 +                export PATH=$PATH:/​native/​usr/​sbin 
 +            fi 
 +        fi
     ;; esac     ;; esac
     case $OSTYPE in solaris*)     case $OSTYPE in solaris*)
Line 310: Line 316:
         # add /usr/sbin if wanted         # add /usr/sbin if wanted
         [ $(echo $PATH | grep -c '/​usr/​sbin:'​) ​ -eq 0 ] && ​         [ $(echo $PATH | grep -c '/​usr/​sbin:'​) ​ -eq 0 ] && ​
-            ​[[ -n $WANT_SBIN ​]] && export PATH=$PATH:/​usr/​sbin+            [ -n $WANT_SBIN ] && export PATH=$PATH:/​usr/​sbin
  
         # check for gnu         # check for gnu
         export PATH=$(echo $PATH | /bin/sed -r '​s#:/​usr/​gnu/​s?​bin##​g'​)         export PATH=$(echo $PATH | /bin/sed -r '​s#:/​usr/​gnu/​s?​bin##​g'​)
-        [ -d /​usr/​gnu/​bin ] && export PATH=$PATH:/​usr/​gnu/​bin +        ​if [ -d /usr/gnu ]; then 
-        [ -/usr/gnu/sbin ] && [[ -n $WANT_SBIN ]] && ​export PATH=$PATH:/usr/gnu/sbin+            export PATH=$PATH:/​usr/​gnu/​bin 
 +            [ -n $WANT_SBIN ​] && export PATH=$PATH:/​usr/​gnu/​sbin 
 + 
 +            # selective gnu / colorization 
 +            [ -e /​usr/​gnu/​bin/sed ] && alias sed='/​usr/​gnu/​bin/​sed'​ 
 +            [ -/usr/gnu/bin/​diff ​] && ​alias diff='/​usr/​gnu/​bin/​diff'​ 
 +            ​-e /​usr/​gnu/​bin/​tar ] && alias tar='/​usr/​gnu/​bin/​tar'​ 
 +            ​[ -e /​usr/​gnu/​bin/​rm ​] && ​alias rm='/usr/gnu/bin/​rm'​ 
 +        fi
   ​   ​
         # check for pkgsrc (smartos)         # check for pkgsrc (smartos)
         export PATH=$(echo $PATH | /bin/sed -r '​s#/​opt/​local/​s?​bin:##​g'​)         export PATH=$(echo $PATH | /bin/sed -r '​s#/​opt/​local/​s?​bin:##​g'​)
-        [ -d /opt/local/bin && ​export ​PATH=/​opt/​local/​bin:$PATH +        ​export MANPATH=$(echo $MANPATH | /bin/sed -r '​s#/​opt/​local/​man:##​g'​) 
-        [ -d /opt/local/sbin ] && [[ -n $WANT_SBIN ​]] && export PATH=/​opt/​local/​sbin:​$PATH +        if [ -d /opt/local ]; then 
-        ​[ -d /​opt/​local/​man ] && export MANPATH=/​opt/​local/​man:​$MANPATH+            ​export ​MANPATH=/​opt/​local/​man:$MANPATH 
 +            export ​PATH=/opt/local/bin:$PATH 
 +            ​[ -n $WANT_SBIN ] && export PATH=/​opt/​local/​sbin:​$PATH 
 +        ​fi
  
         # check for omniti repository (omnios)         # check for omniti repository (omnios)
         export PATH=$(echo $PATH | /bin/sed -r '​s#/​opt/​omni/​s?​bin:##​g'​)         export PATH=$(echo $PATH | /bin/sed -r '​s#/​opt/​omni/​s?​bin:##​g'​)
         export MANPATH=$(echo $MANPATH | /bin/sed -r '​s#/​opt/​omni/​share/​man:##​g'​)         export MANPATH=$(echo $MANPATH | /bin/sed -r '​s#/​opt/​omni/​share/​man:##​g'​)
-        [ -d /opt/omni/​bin ​&& export PATH=$PATH:/​opt/​omni/​bin +        ​if [ -d /opt/local ]; then 
-        [ -d /​opt/​omni/​sbin ] && [[ -n $WANT_SBIN ]] && export PATH=$PATH:/​opt/​omni/​sbin +            export MANPATH=$MANPATH:/​opt/​omni/​share/​man 
-        [ -d /​opt/​omni/​share/​man ] && ​export MANPATH=$MANPATH:/​opt/​omni/​share/​man +            export PATH=$PATH:/​opt/omni/bin 
- +            [ -n $WANT_SBIN ​] && export PATH=$PATH:/​opt/omni/sbin 
-        # check for sfw +        fi
-        ​export PATH=$(echo ​$PATH | /bin/sed -r 's#:/usr/sfw/s?bin##g') +
-        [ -d /​usr/​sfw/​bin ​] && export PATH=$PATH:/​usr/sfw/bin+
  
         # check for local         # check for local
         export PATH=$(echo $PATH | /bin/sed -r '​s#/​usr/​local/​s?​bin:##​g'​)         export PATH=$(echo $PATH | /bin/sed -r '​s#/​usr/​local/​s?​bin:##​g'​)
-        [ -d /usr/local/bin && ​export PATH=/​usr/​local/​bin:​$PATH +        ​if [ -d /usr/local ]; then 
-        [ -d /​usr/​local/​sbin ] && [[ -n $WANT_SBIN ​]] && export PATH=/​usr/​local/​sbin:​$PATH+            ​export PATH=/​usr/​local/​bin:​$PATH 
 +            [ -n $WANT_SBIN ] && export PATH=/​usr/​local/​sbin:​$PATH 
 +        fi
  
         # check for opencsw         # check for opencsw
         export PATH=$(echo $PATH | /bin/sed -r '​s#:/​opt/​csw/​s?​bin##​g'​)         export PATH=$(echo $PATH | /bin/sed -r '​s#:/​opt/​csw/​s?​bin##​g'​)
-        [ -d /opt/csw/bin && ​export PATH=$PATH:/​opt/​csw/​gnu:/​opt/​csw/​bin +        ​if [ -d /opt/csw ]; then 
-        [ -d /​opt/​csw/​sbin ] && [[ -n $WANT_SBIN ​]] && export PATH=$PATH:/​opt/​csw/​sbin+            ​export PATH=$PATH:/​opt/​csw/​gnu:/​opt/​csw/​bin 
 +            [ -n $WANT_SBIN ] && export PATH=$PATH:/​opt/​csw/​sbin 
 +        fi
  
         # colorization         # colorization
Line 354: Line 373:
           /​usr/​gnu/​bin/​grep) alias grep='​grep --color=auto'​ ;;           /​usr/​gnu/​bin/​grep) alias grep='​grep --color=auto'​ ;;
         esac         esac
- 
-        # selective gnu / colorization 
-        [ -e /​usr/​gnu/​bin/​grep ] && alias grep='/​usr/​gnu/​bin/​grep --color=auto'​ 
-        [ -e /​usr/​gnu/​bin/​sed ] && alias sed='/​usr/​gnu/​bin/​sed'​ 
-        [ -e /​usr/​gnu/​bin/​diff ] && alias diff='/​usr/​gnu/​bin/​diff'​ 
-        [ -e /​usr/​gnu/​bin/​tar ] && alias tar='/​usr/​gnu/​bin/​tar'​ 
-        [ -e /​usr/​gnu/​bin/​rm ] && alias rm='/​usr/​gnu/​bin/​rm'​ 
     ;; esac     ;; esac
     case $OSTYPE in openbsd*)     case $OSTYPE in openbsd*)
configuration/zsh.txt · Last modified: 2017/05/01 18:32 by sjorge