Skip to content

Commit

Permalink
iphone compatibility - use fd redirects rather than explicitly naming…
Browse files Browse the repository at this point in the history
… /dev/stderr.
  • Loading branch information
rupa committed Jul 2, 2009
1 parent 46bb84b commit 66cb486
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions z.sh
Expand Up @@ -53,7 +53,7 @@ z() {
else
# list/go
while [ "$1" ]; do case "$1" in
-h) echo "z [-h][-l][-r][-t] args" >/dev/stderr; return;;
-h) echo "z [-h][-l][-r][-t] args" >&2; return;;
-l) local list=1;;
-r) local typ="rank";;
-t) local typ="recent";;
Expand All @@ -75,8 +75,8 @@ z() {
function output(files, toopen, override) {
if( list ) {
if( typ == "recent" ) {
cmd = "sort -nr >/dev/stderr"
} else cmd = "sort -n >/dev/stderr"
cmd = "sort -nr >&2"
} else cmd = "sort -n >&2"
for( i in files ) if( files[i] ) printf "%-15s %s\n", files[i], i | cmd
if( override ) printf "%-15s %s\n", "common:", override > "/dev/stderr"
} else {
Expand Down

0 comments on commit 66cb486

Please sign in to comment.