Skip to content

Command substitutions in shell commands #568

Open
@flipsi

Description

@flipsi

Question: Is there support for command substitutions in shell commands? If not, consider this a feature request.

I tried

:shell echo $(date)

and

:shell echo \$(date)

but I always only see the literal (escaped?) string

$(date)

instead of the desired

Mon Oct 21 12:51:29 PM CEST 2024

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.$(date +%F-%%H%M%S).bak"] }

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions