summary refs log tree commit diff
path: root/Makefile.am
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2011-03-10 21:23:11 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2011-03-10 21:23:11 +0800
commit8213431d222b56316e225a1f308b62a72fbb1faa (patch)
tree303808ccc3ab85a23f38a4920228fd35f794d6da /Makefile.am
parent[BUILTIN] Fix CTLESC clobbering by read(1) (diff)
downloaddash-8213431d222b56316e225a1f308b62a72fbb1faa.tar.gz
dash-8213431d222b56316e225a1f308b62a72fbb1faa.zip
[BUILTIN] Dotcmd should exit with zero when doing nothing
Tim Allen wrote:

> The POSIX specification for the dot command[1] states:
>
>     EXIT STATUS
>         Returns the value of the last command executed, or a zero exit
>         status if no command is executed.
>
> If an empty file is sourced, then "no command is executed"

I agree.  Looking through "git log --patch src/main.c", though, I find
v0.5.3~42 (Do not clobber exit status in dotcmd., 2005-03-03), which
appears to have been meant to take care of the following case:

        $ cat printstatus.sh
        echo $?
        $ false
        $ . ./printstatus.sh
        1

I wonder if the following on top might help (imitating evalcmd)?

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'Makefile.am')
0 files changed, 0 insertions, 0 deletions
&follow=1'>Add color to tagsJune McEnroe 2019-02-25Remove tag X macros againJune McEnroe 2019-02-25Add M-a to switch to hot or unread windowJune McEnroe 2019-02-25Refactor uiReadJune McEnroe 2019-02-24Scroll by full pages with PageUp/PageDownJune McEnroe 2019-02-23Clarify /window documentationJune McEnroe 2019-02-23Use first word of params in input commandsJune McEnroe 2019-02-23Add C-n and C-p key bindings to switch windowsJune McEnroe 2019-02-23Change example command to join #ascii.town on freenodeJune McEnroe 2019-02-23Call def_prog_mode after termNoFlowJune McEnroe 2019-02-22Move IRC formatting reset to C-sJune McEnroe 2019-02-22Disable terminal flow controlJune McEnroe 2019-02-22Bind up and down arrows to scrollJune McEnroe 2019-02-22Remove topic TODOJune McEnroe 2019-02-22Add /znc commandJune McEnroe 2019-02-22Update status line after scrolling and term eventsJune McEnroe 2019-02-22Reorganize input.cJune McEnroe 2019-02-22Fix name of <raw> window in man pageJune McEnroe 2019-02-22Rename global tags with angle bracketsJune McEnroe 2019-02-22Show status window while connectingJune McEnroe 2019-02-22Reorganize UI code for the umpteenth timeJune McEnroe 2019-02-21Replace "view" with "window"June McEnroe 2019-02-21Remove ROT13June McEnroe 2019-02-21Clean up man pageJune McEnroe 2019-01-26Draw UI before connectingJune McEnroe 2019-01-25Avoid unused variable warnings with getyxJune McEnroe 2019-01-25Add GNU/Linux build instructionsJune McEnroe