Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix status code when bad command name is entered #3616

Merged

Commits on Dec 3, 2016

  1. Fix status code when bad command name is entered

    This commit fixes a bug which causes that
    
       fish -c ')'; echo $status
    
    ("Illegal command name" error) returns 0. This is inconsistent with
    e.g. when trying to run non-existent command:
    
       fish -c 'invalid-command'; echo $status
    
    ("Unknown command" error) which correctly returns 127.
    
    A new status code,
    
        STATUS_ILLEGAL_CMD = 123
    
    is introduced - which is returned whenever the 'Illegal command name *'
    message is printed.
    
    This commit also adds a test which checks if valid commands return 0,
    while commands with illegal name return status code 123.
    
    Fixes fish-shell#3606.
    radomirbosak committed Dec 3, 2016
    Configuration menu
    Copy the full SHA
    f796b29 View commit details
    Browse the repository at this point in the history