In bash shell, could I echo $? get the exit code of a program running on cli. What is equivalent in a fish shell? It does not seem to be found in the docs.
echo $?
According to this website https://fishshell.com/docs/current/faq.html#faq-exit-status you can use the $status variable:
$status
How to get team exit status?Use the $status variable. Does this replace the variable $? used in some other shells.
Use the $status variable. Does this replace the variable $? used in some other shells.
$?