-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fish unconditionally display manpath when fish version is 2.7 or later #3728
Conversation
Thanks for the proposal! This special case for On your proposal, changes will bring back to errored MANPATH setting (cf. 74f8bbd). Is there another way in fish to set
opam have an included test suite that tests only main operation (install, pin, update, upgrade, etc.). Shell features are not tested automatically, only via manual testing. |
Related to #3671 |
I changed it to use an |
I’m not a
|
Hi everyone, I looked at the fish changelog here: https://fishshell.com/release_notes.html and decided to test for the presence of the The command in structured in such a way that fish versions prior to 2.3 will attempt to execute a nonexistent Unfortunately, I can't redirect the stderr output of failing to execute a nonexistent command to
This means that old fishes (prior to 2.3) will get stray output on stderr, but it shouldn't affect the functionality. I don't know a good way to fix it besides redirecting stderr to |
Thanks for the changes! ~> builtin -n | grep argparse > /dev/null 2>&1
~> echo $status
1
~> builtin -n | grep string > /dev/null 2>&1
~> echo $status
0 Having error messages (from shell) is an unwanted behaviour, even if it is sometimes just cosmetic, but in this case, when shell hook is enabled |
@rjbou All right. We should be ready to go. I went with |
Thanks! It's a go for me! |
Hello, I would like feedback on this change and advice on how to write a test for it. I briefly looked through the test directory and saw some scaffolding for "fake packages", but could not figure out what the right way to set up a "fake switch" is for testing purposes.
My system opam packaged by Manjaro (version
2.0.1
, sha256sum2b76b39ed8d53923b81985b618d4ef13fca1eabb7110bb477c7f9a3e4ae01767
) does not produce a fish shell fragment for theMANPATH
environment variable, causingopam
to erroneously report that the environment is out of sync.As a workaround, I have been using the following
fish
function.setenv
is a valid fish command and the quoting strategy used byOpamConfigEnv.print_csh_env
seems to work for fish if the paths contain sensible characters.I removed a conditional and changed it so that
OpamConfigEnv.print_fish_env
always prints theMANPATH
, since none of the otherprint_*_env
functions appear to have dedicated logic for theMANPATH
environment variable.I tested it by
evaling
fragments generated by the development version ofopam
and checking for the presence or absence of warnings.No tests failed as a result of this change. At least one test probably should have failed, though.
Thanks in advance,
Greg