From: Nicolas Boisselier Date: Mon, 22 Jun 2015 13:41:35 +0000 (+0100) Subject: Double equal X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=26ec8d1851679830aac7e894cf8d1648fc3e8fbb;p=nb.git Double equal --- diff --git a/etc/bashrc b/etc/bashrc index f7d5a03e..9146f759 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -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 diff --git a/etc/bashrc.alias b/etc/bashrc.alias index e8edb349..90cc2486 100644 --- a/etc/bashrc.alias +++ b/etc/bashrc.alias @@ -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 diff --git a/etc/bashrc.function b/etc/bashrc.function index b920560f..ada84517 100644 --- a/etc/bashrc.function +++ b/etc/bashrc.function @@ -57,7 +57,7 @@ unzipurl() { bytes2h() { declare in="cat" args="" - if [ "$1" == "-regex" ]; then + if [ "$1" = "-regex" ]; then args="regex=$2" shift shift