Web lists-archives.com

Re: Fish shell: cygwin.conf hiding user paths




> 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