Limitation of setenv for tcsh: Too many arguments
KAVALAGIOS Panagiotis (EEAS-EXT)
Panagiotis.KAVALAGIOS@ext.eeas.europa.eu
Mon Jan 11 08:11:31 GMT 2021
> -----Original Message-----
> From: Cygwin <cygwin-bounces@cygwin.com> On Behalf Of Achim Gratz
> Sent: 08 January 2021 17:19
>
> KAVALAGIOS Panagiotis (EEAS-EXT) writes:
> > Why do you say both? I don't add /usr/bin anywhere.
>
> Your other example with the $path csh variable doesn't quote $path, which
> you must do with the quote modifier rather than actual quotes, so $path:q
> because it is an wordlist var. Also see the -f / -l option for the set builtin of
> tcsh if you want to strip out duplicates and take note of some subtle
> differences in the default quoting between tcsh and csh if you are trying to
> be portable.
I might forgot to double quote my variables in my ancient tcsh startup startup scripts using in other systems, but of course I have checked the issue on a clean environment before reporting that. Forget the tcsh, this is coming from the bash as well the very first time you are running Cygwin:
-------------------
Copying skeleton files.
These files are for the users to personalise their cygwin experience.
They will never be overwritten nor automatically updated.
'./.bashrc' -> '/home/kavalpa//.bashrc'
'./.bash_profile' -> '/home/kavalpa//.bash_profile'
'./.inputrc' -> '/home/kavalpa//.inputrc'
'./.profile' -> '/home/kavalpa//.profile'
kavalpa@BELBRU-L1903777 ~
$ echo $PATH
/usr/local/bin:***/usr/bin***:/cygdrive/c/Program Files/Npm:[snip]:/cygdrive/c/Program Files/PHP/composer/bin:***/usr/bin***:/cygdrive/c/Users/kavalpa/AppData/Local/Microsoft/WindowsApps
-------------------
The issue is enclosed with a three-star notation. I have checked /etc startup files, but I couldn't figure out why this is happening. It is also weird the location at the end before user's personal paths.
> >> As an aside, it is highly unlikely that you'd actually want to set up
> >> your PATH like that.
> >
> > Care to explain? How else can I add in the path custom personal
> commands?
>
> I just don't think it's a good idea to have all that stuff in PATH, especially since
> PATH in Windows determines library search order and there is a high
> propensity for libraries with the same name getting reachable via PATH for
> your example. I tend to stay within Cygwin as much as possible and have
> wrapper scripts setting up the environment for all other commands.
There is a point with the DLLs in the path of Windows, but where do you store your wrapper scripts? Because I usually place them in my ~/bin, which is the only solution when you don't have admin rights on your machine. When I do have admin rights, I usually place them in /usr/local/bin.
Panos
Application Architect
CONSULIAT (under contract with the EEAS)
BA.BS.3.IS
Office: EEAS B100 Floor 5 Area 048
Rue Belliard 100, 1000 Brussels
Phone: +32 2 584 6017
More information about the Cygwin
mailing list