]> git.nbdom.net Git - nb.git/commitdiff
Double equal
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 22 Jun 2015 13:41:35 +0000 (14:41 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 22 Jun 2015 13:41:35 +0000 (14:41 +0100)
etc/bashrc
etc/bashrc.alias
etc/bashrc.function

index f7d5a03ec160c336271e48689e6a92ab5831dc21..9146f759d344f0dc3a88a46b43f36f359ed9c21d 100644 (file)
@@ -72,7 +72,7 @@ case "$HOSTNAME" in
   *) color=36 ;;
 esac
 
-char='$'; [ $UID == "0" ] && char='#'
+char='$'; [ $UID = "0" ] && char='#'
 if [ "$color_prompt" = yes ]; then
        PS1="\[\033[01;${color}m\]\u@$h:\[\033[00m\]\W${char} "
 else
@@ -89,7 +89,7 @@ else
   ls_opt="$ls_opt --time-style=long-iso"
   [ "$color_prompt" = yes ] && ls_opt="$ls_opt --color=auto"
 fi
-[ "$ls_opt" == "" ] || alias ls="ls $ls_opt"
+[ "$ls_opt" = "" ] || alias ls="ls $ls_opt"
 unset ls_opt
 alias ll='ls -lh'
 unset color char color_prompt h
index e8edb349be8da506326e1111d33d30ce453e9592..90cc2486c84cae3ecd5ca08964487ef526b19c0e 100644 (file)
@@ -19,7 +19,7 @@ alias nmap-ping="nmap -sP -PE -PS443 -PA21,22,23,80,3389"
 alias arp-list="arp -an"
 alias pdf2jpegs='gs -dNOPAUSE -sDEVICE=jpeg -dFirstPage=1 -dLastPage=5 -sOutputFile=pdf2jpegs%d.jpg -dJPEGQ=100 -r500 -c quit'
 
-#[ "$UID" == "0" ] && grep -q '^_\?postgres:' /etc/passwd && alias psql='sudo -u postgres psql'
+#[ "$UID" = "0" ] && grep -q '^_\?postgres:' /etc/passwd && alias psql='sudo -u postgres psql'
 
 #--------------------------------------------------------------------------------
 # Etherwake
@@ -48,8 +48,8 @@ test "$TERM_PROGRAM" = "iTerm.app" && export PROMPT_COMMAND='printf "\033]0;%s\0
 #--------------------------------------------------------------------------------
 # Get / Head
 #
-alias Head="lynx -dump -head -width=1000"
-alias Get="lynx -source -width=1000"
+alias Head="lynx -dump -head -width=0"
+alias Get="lynx -source -width=0"
 
 #--------------------------------------------------------------------------------
 # bc
@@ -70,7 +70,7 @@ alias vi=vim
 #--------------------------------------------------------------------------------
 # xterm
 #
-[ -z /usr/bin/xterm ] && alias xterm="xterm -bg black -fg gray -fn 10x20"
+[ -x /usr/bin/xterm ] && alias xterm="xterm -bg black -fg gray -fn 10x20"
 
 #--------------------------------------------------------------------------------
 # Torrent
index b920560f69f7f47516f50435c30836fb06412a14..ada84517899b08c9f81b22f329e99d9456eaa7f9 100644 (file)
@@ -57,7 +57,7 @@ unzipurl() {
 
 bytes2h() {
   declare in="cat" args=""
-  if [ "$1" == "-regex" ]; then
+  if [ "$1" = "-regex" ]; then
     args="regex=$2"
     shift
     shift