3 ms·
This is really useful! Some ideas: Use single quotes in all your examples in the docs. '$1' doesn't expand but "$1" does. Also, if you can create a zsh funct
by parentheses 3y ago
This is really useful!
Some ideas:
Use single quotes in all your examples in the docs. '$1' doesn't expand but "$1" does.
Also, if you can create a zsh function that can be mapped to a key like Alt-P (for analyze pipelines), then treat the entire line like a string and pass it to `pd`. Or, you could have it wrap and escape the command by editing the command line:
`NEW_COMMAND="pd $(printf '%q' "$BUFFER")"`
This also solves for mixed use of quotes like single and double quotes. Once I discovered it, I used it in all my scripts for treating strings in bash properly.