Skip to content

zsh variable modifier "h" handling #218

Description

@emilywilder

When a shell file contains a variable with the h modifier, bashsupport-pro has a few issues matching the usage described in the ZSHEXPN man page under the HISTORY EXPANSION section, under Modifiers, then h.

echo $0:h       # works fine
echo ${0:h}     # is flagged as "referenced but not assigned"

echo $0:h1      # incorrectly NOT flagged as an error
echo ${0:h1}    # also flagged as "referenced but not assigned"

To my reading, the usages ${0:h} and ${0:h1} should not be flagged as an error, and $0:h1 should be flagged as an error.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions