Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shell substitutions not working for substrings #567

Open
flipsi opened this issue Oct 21, 2024 · 0 comments
Open

Shell substitutions not working for substrings #567

flipsi opened this issue Oct 21, 2024 · 0 comments

Comments

@flipsi
Copy link
Contributor

flipsi commented Oct 21, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant