Re: [PATCH 05/48] a little creative parameter expansion simplifies stat_die()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Nice patch, but ...

> -if [ -t 1 ]; then
> +if [[ -t 1 ]]; then
>  	SAVE_POSITION="\033[s"
>  	RESTORE_POSITION="\033[u"
>  	DEL_TEXT="\033[$(($STAT_COL+4))G"
> @@ -116,10 +116,8 @@ stat_fail() {

Hmm, this definitely doesn't belong into this patch.

>  }
>  
>  stat_die() {
> -	retval=1
> -	[ "$1" = "" ] || retval=$1
>  	stat_fail
> -	exit $retval
> +	exit ${1:-1}
>  }
>  
>  status() {

Okay, this is certainly nicer than before.

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux