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

Add q alias for shellQuote template function? #1601

Closed
vergenzt opened this issue Apr 18, 2024 · 2 comments · Fixed by #1603
Closed

Add q alias for shellQuote template function? #1601

vergenzt opened this issue Apr 18, 2024 · 2 comments · Fixed by #1603
Labels
good first issue Issues that are good for first-time contributors to pick up. type: enhancement A change to an existing feature or functionality.

Comments

@vergenzt
Copy link
Contributor

The project I'm working on right now works with a lot of files with special characters in their names. I'm passing these filenames around as variables and referring to them a lot in shell commands.

I just realized I can use the shellQuote function to quote things... but unfortunately that makes my commands a lot longer since I'm referring to 2-3 filename variables in each command (having to write temporary files in a pipeline into a directory containing special chars), so I'm having to repeat {{shellQuote .VAR}} a lot.

It'd be SOOOO nice to be able to just do {{q .VAR}}! Without (IMO) really any loss of clarity. Since the primary / only(?) way of actually operating on the contents of variables is via shell commands, it seems appropriate to me that the shellQuote function should have such a short alias.

Thoughts?

@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Apr 18, 2024
@andreynering andreynering added type: enhancement A change to an existing feature or functionality. good first issue Issues that are good for first-time contributors to pick up. and removed state: needs triage Waiting to be triaged by a maintainer. labels Apr 18, 2024
@andreynering
Copy link
Member

@vergenzt I liked the idea. Contributions welcome! This should be easy to do.

@vergenzt
Copy link
Contributor Author

PR opened! #1603

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issues that are good for first-time contributors to pick up. type: enhancement A change to an existing feature or functionality.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants