On 2/27/13 5:17 PM, Bob Proulx wrote: > Chet Ramey wrote: >> Keep in mind that posh is overly strict in some areas (e.g., it throws >> an error on `exit 1'). It may not be useful in isolation. > > As I did mention I have found that posh is somewhat less than useful > in Real Life. But you say it throws an error on exit 1? > > $ cat >/tmp/trial <<'EOF' > #!/bin/posh > echo "Hello from posh" > exit 1 > EOF > $ chmod a+x /tmp/trial > $ /tmp/trial > Hello from posh > $ echo $? > 1 > > I see no error when using 'exit 1'. Other than the expected exit > code. What am I missing?
I don't know what version you're using; I have 0.11. $ ./posh \[\]${HOST}($SHLVL)\$ exit 1 ./posh: exit: bad number $ ./posh \[\]${HOST}($SHLVL)\$ exit 10 ./posh: exit: bad number $ echo $? 1 -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/