public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: cygwin-apps@cygwin.com
Subject: tcsh /etc/default files
Date: Sat, 05 Feb 2022 08:02:27 +0100	[thread overview]
Message-ID: <87bkzlzth8.fsf@Rainer.invalid> (raw)


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

             reply	other threads:[~2022-02-05  7:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-05  7:02 Achim Gratz [this message]
2022-02-05 10:20 ` Corinna Vinschen
2022-02-05 17:09   ` Achim Gratz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bkzlzth8.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).