What is a special variable that stores previous command output in zshell? For example, if I did:
$ which zsh something
Instead of copying the output of "something", is there a way to get the result using a special variable?
I know I could use $_ to get the previous command that was called, is there something similar?
$_
You can simply wrap $_ in $() to execute it again. I suppose,
$()
$ which zsh /bin/zsh $ echo $($_) /bin/zsh
Not sure if there is a variable that contains this output without running the command again, though ...