public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* tcsh /etc/default files
@ 2022-02-05  7:02 Achim Gratz
  2022-02-05 10:20 ` Corinna Vinschen
  0 siblings, 1 reply; 3+ messages in thread
From: Achim Gratz @ 2022-02-05  7:02 UTC (permalink / raw)
  To: cygwin-apps


I'm not certain if I ever discussed this before, but the recent tcsh
update reminded me that I think the defaults should be changed a little
bit.  First off, running the scripts in profile.d should IMHO be done in
csh.login to ensure it's only done once.  Secondly the (optional)
cleaning up of the PATH variable already introduced for all POSIX shells
in base-files years ago should be replicated for tcsh.  Lastly, since
/usr/bin/ and /bin are the same thing on Cygwin, one of them is
redundant and placement of /usr/local/bin should be left at the
discretion of the user since tha directory does not exist by default on
Cygwin.

--8<---------------cut here---------------start------------->8---
--- /etc/defaults/etc/csh.cshrc 2022-02-03 18:25:13.000000000 +0100
+++ /etc/csh.cshrc      2019-06-02 19:07:20.072715800 +0200
@@ -3,16 +3,6 @@
 #
 onintr -
 
-if ( -d /etc/profile.d ) then
-  set nonomatch
-  foreach _s ( /etc/profile.d/*.csh )
-    if ( -r $_s ) then
-      source $_s
-    endif
-  end
-  unset _s nonomatch
-endif
-
 if (! ${?prompt}) goto end
 
 # This is an interactive session

--- /etc/defaults/etc/csh.login 2022-02-03 18:25:13.000000000 +0100
+++ /etc/csh.login      2019-06-02 19:07:19.229253700 +0200
@@ -4,7 +4,21 @@
 unsetenv TEMP
 unsetenv TMP
 
-set path=( /usr/local/bin /usr/bin /bin $path:q )
+set winpath = ( $path:q )
+if ( ${?CYGWIN_NOWINPATH} ) then
+  set path=( /usr/bin )
+else
+  set path=( /usr/bin $path:q )
+endif
+if ( -d /etc/profile.d ) then
+  set nonomatch
+  foreach _s ( /etc/profile.d/*.csh )
+    if ( -r $_s ) then
+      source $_s
+    endif
+  end
+  unset _s nonomatch
+endif
 
 if ( ! ${?USER} ) then
   set user="`id -un`"
--8<---------------cut here---------------end--------------->8---


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: tcsh /etc/default files
  2022-02-05  7:02 tcsh /etc/default files Achim Gratz
@ 2022-02-05 10:20 ` Corinna Vinschen
  2022-02-05 17:09   ` Achim Gratz
  0 siblings, 1 reply; 3+ messages in thread
From: Corinna Vinschen @ 2022-02-05 10:20 UTC (permalink / raw)
  To: cygwin-apps

On Feb  5 08:02, Achim Gratz wrote:
> 
> I'm not certain if I ever discussed this before, but the recent tcsh
> update reminded me that I think the defaults should be changed a little
> bit.  First off, running the scripts in profile.d should IMHO be done in
> csh.login to ensure it's only done once.  Secondly the (optional)
> cleaning up of the PATH variable already introduced for all POSIX shells
> in base-files years ago should be replicated for tcsh.  Lastly, since
> /usr/bin/ and /bin are the same thing on Cygwin, one of them is
> redundant and placement of /usr/local/bin should be left at the
> discretion of the user since tha directory does not exist by default on
> Cygwin.

Fine with me, but these files are not part of the distro package
only.  They are part of the upstream tcsh package and just copied
into the right place by a cygwin-specific postinstall step, also
part of the upstream Makefile.

I'm going to send the patch upstream, with a very minor tweak it
applies cleanly.


Thanks,
Corinna

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: tcsh /etc/default files
  2022-02-05 10:20 ` Corinna Vinschen
@ 2022-02-05 17:09   ` Achim Gratz
  0 siblings, 0 replies; 3+ messages in thread
From: Achim Gratz @ 2022-02-05 17:09 UTC (permalink / raw)
  To: cygwin-apps

Corinna Vinschen writes:
> Fine with me, but these files are not part of the distro package
> only.  They are part of the upstream tcsh package and just copied
> into the right place by a cygwin-specific postinstall step, also
> part of the upstream Makefile.

Hmm, OK.  Preferrably we wouldn't install them with tcsh and leave that
to base-files.

> I'm going to send the patch upstream, with a very minor tweak it
> applies cleanly.

That'll hopefully work.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-05 17:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-05  7:02 tcsh /etc/default files Achim Gratz
2022-02-05 10:20 ` Corinna Vinschen
2022-02-05 17:09   ` Achim Gratz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).