This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Fish shell: cygwin.conf hiding user paths
- From: Andrew Schulman <schulman dot andrew at epa dot gov>
- To: cygwin at cygwin dot com
- Date: Wed, 11 Oct 2017 10:17:24 -0400
- Subject: Re: Fish shell: cygwin.conf hiding user paths
- Authentication-results: sourceware.org; auth=none
- References: <CACDsba3=cSCpZrWk-sSf22YQGsCvuhsS1kvK359oXxZyZEZr6Q@mail.gmail.com>
> The file /etc/fish/conf.d/cygwin.conf has the following section:
>
> # Prepend system directories to PATH
> for p in /bin /usr/local/bin
> if not contains $p $PATH
> set -x PATH $p $PATH
> end
> end
>
> The issue with this is that these get prepended before
> fish_user_paths, essentially clobbering any user overrides. It also
> swaps round if the user edits fish_user_paths, or when nesting fish,
> which is surprising and unhelpful behaviour.
>
> A simple fix to the behaviour would be to run __fish_reconstruct_path
> after, like so:
>
> # Prepend system directories to PATH
> for p in /bin /usr/local/bin
> if not contains $p $PATH
> set -x PATH $p $PATH
> end
> end
> __fish_reconstruct_path
>
> Which works just fine for me.
Whek, thanks. I wasn't aware of either fish_user_paths or
__fish_reconstruct_path.
I added __fish_reconstruct_path as you suggested, and checked that it
works. I'll upload a new release shortly.
ANdrew
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple