Skip to content

history-expansion does not highlight & (previous substitution modifier) character #929

Open
@zaidhaan

Description

@zaidhaan

Screenshot: (note that expansion does work as expected after hitting return. & however, is not highlighted)
image

Reproducible setup:

$ echo foo_replaceme_bar
$ echo baz_replaceme_qux
$ !-2:s/replaceme/subst/ && !-1:&   

Relevant zsh manual section: 14.1.4 Modifiers.

&
Repeat the previous s substitution. Like s, may be preceded immediately by a g. In parameter expansion the & must appear inside braces, and in filename generation it must be quoted with a backslash.

I'm no zsh expert but I think all modifiers apply to history expansions too, so the modifier & should be also be highlighted in history-expansion.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions