Skip to content

Shell substitutions not working for substrings #567

Open
@flipsi

Description

@flipsi

If I execute :shell echo hello %s on a file filename.ext I will get

hello filename.ext

as expected. However if I execute :shell echo hello %s.foo I will get

hello %s.foo

which is not desired. Instead I would expect

hello filename.ext.foo

My use case is is to create a keybinding to create a copy of a file like this:

  { keys = ["y", "b"], commands = ["shell cp -r %s %s.bak"] }

or

  { keys = ["y", "b"], commands = ["shell cp -r %s %s.$(date +%F-%%H%M%S).bak"] }

This may be "fixed" together with the related issue/suggestions here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions