bashsupport-pro icon indicating copy to clipboard operation
bashsupport-pro copied to clipboard

zsh variable modifier "h" handling

Open emilywilder opened this issue 2 months ago • 0 comments

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.

emilywilder avatar Oct 07 '25 20:10 emilywilder