To catch errors in Fish, lean on the status command and conditionals.
status
In Fish, logging can be as simple as redirecting standard output and error streams to a file.
In Fish, you write a function with function keyword, give it a name, and end with end.
function
end
Imagine you’ve got a script that’s grown quite a bit over time.