Closed bwolf closed 3 years ago
Hydro only shows the exit status AFAIC. Can you share a screenshot?
~/C/hydro main ❱ foo
fish: Unknown command: foo
~/C/hydro main [127]
Example with fish shell 3.2.2 and Hydro a5877e9ef76b3e915c06143630bffc5ddeaba2a1
which is the commit from 2021-05-15:
~/s/p/p/project master ❱ mvn clean test
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.892 s
[INFO] Finished at: 2021-11-01T19:08:03+01:00
[INFO] ------------------------------------------------------------------------
~/s/p/p/project master /nix/store/dj7xwrgp4kjl36f09yyqsl1ay8glxk5b-lorri-keep-env-hack-nix-shell 1.8s [1]
Note: this only happens when running a command in a directory which is baked by direnv
and a shell.nix
Nix environment. Running it outside, say in ~
, only the exit code is printed.
~ ❱ zsh -c 'sleep 2; exit 0'
~ 2s ❱ zsh -c 'sleep 2; exit 1'
~ 2s [1]
Hydro only prints the error code when exit code != 0. This must be the git prompt behaving erratically.
I often see error codes like [0|1]
. Can’t remember if there’s a type of command that consistently causes that though.
Ok thanks, I assume this has nothing to do with Hydro.
@brandonpittman Yup. That's the pipestatus. See https://fishshell.com/docs/current/language.html#variables-status.
@jorgebucaran Never knew about that. Thanks for the link.
Sorry for commenting on a closed issue, but did you find a solution for this issue? @bwolf
@okkdev unfortunately not.
Hydro extends the prompt with the full path of the last command that failed (exit code != 0). This path is for NixOS users very long (a path like /nix/store/p4i6hi976q7csprsb35d4wx797wzpri2-lorri-keep-env-hack-nix-shell) and I personally would like to hide the full path. Instead it would be enough to display the name of last command or hide it completly. Is there any option to configure this, or is a change required to implement this?