Skip to content

several POSIX-compliance issues #31

Open

Description

@oguz-ismail
  • variable assignments where the value to be assigned is an empty string don't work, such as
    foo=
    
  • redirections can't be applied to brace groups (and perhaps other compound commands):
    { :; } >&2
    
  • the last case item in a case list has to be terminated explicitly, otherwise it won't work:
    case x in
    x) foo
    esac
    
  • case items where the pattern is enclosed in a pair of parens don't work either:
    case x in
    (x) foo ;;
    esac
    
  • pattern matching parameter expansions don't work at all:
    foo=bar
    echo ${foo#}
    
  • when invoked with -c, the shell doesn't accept positional parameters:
    nsh -c '' nsh 1 2 3
    

I didn't test any further than this.

Activity

  1. nuta commented on Nov 18, 2021

    @nuta
    Owner

    Nice catch! I enjoyed this list of bugs. Will fix it.

  2. added
    bug
    on Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions