I'm looking to speed up my workflow a bit by creating a zsh alias for dtach that would function like this:
dtach -A /tmp/{directoryName} -r winch dvtm
I've tried doing this, which does not work.
dtach -A /tmp/$ -r winch dvtm
ZSH newb here, any help would be much appreciated.
Thanks!
Aliases are simply replaced by their text. Unless you can reorder the parameters of the command you are aliasing so that all parameters are at the end, aliases are not the way to go.
If you want to use parameters, functions are better suited:
function mydtach () {
dtach -A "/tmp/$1" -r winch dvtm
}
Call with:
mydtach directoryName
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With