Skip to content

Tag: zsh

Escaping Backslashes and Double Quotes in zsh Alias

I am trying to create an alias that should turn into the following command: It’s straightforward to just do on bash, but on zsh, the command turns into I can’t get the ” or the to escape. Answer It looks like you’re treating the first and last double-quotes as ‘surrounding&#8217…

Bash export variables but only for current command

I want to load some environment variables from a file before running a node script, so that the script has access to them. However, I don’t want the environment variables to be set in my shell after the script is done executing. I can load the environment variables like this: However, after the command …

mixing process substitution and pipes in zsh

Using ZSH, I am trying to wrap a sed command into a function, then use it, while mixing pipes with process substution. Let me explain with an example: As you can see, in those 2 out of those 3 usages work. The last one is the one that intrigues me here. (Note that all commands work with bash) Can you