Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Shifty shift (Re: ignored-patterns giving correction a go)



On Mar 22,  2:32pm, Sven Wischnowsky wrote:
} Subject: Re: ignored-patterns giving correction a go
}
} Bart Schaefer wrote:
} 
} > } > 	   shift "i > $# ? $# : i"  # Stupid shift error on i > $#
} > } 
} > } Yes! It's annoying, isn't it? I was tempted more than one to change it.
} > 
} > Bash gives the same error.  Sigh.
} 
} So does ksh (`shift: bad number'). Damn.

Foolish consistency?

} Does that make `argv=( $argv[2,-1] )' more efficient in some cases?

More efficient than "i > $# ? $# : i"?  Probably, if the array is short.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author