See repeated /usr/bin in my path

J M cesarjorgemartinez@gmail.com
Wed Apr 17 21:43:43 GMT 2024


Hi Andrew,

Isn't it better that original_path be removed all startwith
$mycygwin_homepath?

You have this scriptlet, but if you need all to work with all Linux
distributions you need yo add unnecessary work, multiple code and cases for
all, and complicate all.

Regards

El mié., 17 abr. 2024 23:35, Andrey Repin <anrdaemon@yandex.ru> escribió:

> Greetings, J M!
>
> > I think that is a bug, in my Windows environment path I have this:
> > C:\cygwin64\bin
>
> > Then for some mystery change this to /usr/bin, instead to delete.
> > You can file an issue?
>
> It's not a bug, it's how Cygwin works.
> If you want to have Cygwin in your system PATH, you'll have to, either
> a) tolerate the duplicated entries in session's $PATH, or
> b) do something to fix it.
>
> I use this scriptlet:
>
> PATH="$( tr ":" "\\n"
> <<<"$HOME/bin:$HOME/.local/bin:/usr/local/bin:/bin:$PATH" | sed -Ee "1,4b;
> \\#Subversion|$HOME|^(/usr(/local)?)?/bin\$#d;" | paste -sd:)" export PATH
>
> (Essentially, I push 4 predefined paths on top of the stack, then filter
> out
> the rest of the stack by some known patterns.)
>
>
> --
> With best regards,
> Andrey Repin
> Thursday, April 18, 2024 00:07:59
>
> Sorry for my terrible english...
>
>


More information about the Cygwin mailing list