What is the special variable that stores that previous command's output in a zshell? For example, if I did:
$ which zsh
something
Instead of copying the output 'something', is there a way to get the output by way of a special variable?
I know I could use $_
to get the previous command that was called, is there something similar?
You could just wrap $_
in $()
to execute it again I suppose
$ which zsh
/bin/zsh
$ echo $($_)
/bin/zsh
Not sure if there's a variable that holds that output without re-running the command though...
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