Subject: misc/21223: possible changes in the shell configuration files
To: None <gnats-bugs@gnats.netbsd.org>
From: None <sobrado@acm.org>
List: netbsd-bugs
Date: 04/18/2003 10:22:15
>Number:         21223
>Category:       misc
>Synopsis:       possible changes in the shell configuration files
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 18 10:23:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Igor Sobrado
>Release:        1.6
>Organization:
University of Oviedo
>Environment:
NetBSD ns1.localnet 1.6 NetBSD 1.6 (GENERIC) #0: Sun Sep  8 19:43:40 UTC 2002
     autobuild@tgm.daemon.org:/autobuild/i386/OBJ/autobuild/src/sys/arch/i386/compile/GENERIC i386

>Description:
I believe that a brief description of the behaviour of each shell
configuration file will help new users making changes on the files
themselves.  So, for example, a user will know if a given change
will be available as soon as he/she starts a new shell, or only
when a login shell is started.

>How-To-Repeat:
It is not a problem, it is a change request.  Currently, shell
configuration files do not provide information about where changes
will be read and executed.

>Fix:
Those are the unified diffs for the current files (please, take care
with the tabs in the keyword strings ($Id$)):


[for dot.cshrc]

--- dot.cshrc   Mon Sep 30 12:07:02 2002
+++ dot.cshrc.new	Wed Apr 16 12:24:10 2003
@@ -1,5 +1,11 @@
-#	$NetBSD: dot.cshrc,v 1.2 2002/09/29 14:52:57 grant Exp $
-#csh .cshrc file
+#	$Id$
+#
+# This is the default standard .cshrc provided to csh users.
+# They are expected to edit it to meet their own needs.
+#
+# The commands in this file are executed each time a new csh shell
+# is started.
+#
 
 alias h		history 25
 alias j		jobs -l

[for dot.login]

--- dot.login   Tue Jul  9 12:31:10 2002
+++ dot.login.new	Wed Apr 16 12:24:54 2003
@@ -1,5 +1,11 @@
-#	$NetBSD: dot.login,v 1.2 2002/07/08 02:54:58 grant Exp $
-#csh .login file
+#	$Id$
+#
+# This is the default standard .login provided to csh users.
+# They are expected to edit it to meet their own needs.
+#
+# The commands in this file are executed when a csh user first
+# logs in.  This file is processed after .cshrc.
+#
 
 if ( ! $?SHELL ) then
   setenv SHELL /bin/csh

[for dot.profile]

--- dot.profile Mon Sep 30 12:07:02 2002
+++ dot.profile.new	Wed Apr 16 12:26:11 2003
@@ -1,4 +1,11 @@
-#	$NetBSD: dot.profile,v 1.2 2002/09/29 14:52:57 grant Exp $
+#	$Id$
+#
+# This is the default standard .profile provided to sh users.
+# They are expected to edit it to meet their own needs.
+#
+# The commands in this file are executed when an sh user first
+# logs in.
+#
 
 PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/pkg/bin
 PATH=${PATH}:/usr/pkg/sbin:/usr/games:/usr/local/bin:/usr/local/sbin

[a new file, that do not hurts but can be useful to have: dot.logout]

#	$Id$
#
# This is the default standard .logout provided to csh users.
# They are expected to edit it to meet their own needs.
#
# The commands in this file are executed when a login shell
# terminates.
#

As recommended by Xavier Humbert <xavier.humbert@xavhome.fr.eu.org>
modifying /etc/profile in the same way as local configuration files
will be good too.  In this case, /etc/csh.* files should be changed
too...

Those files have the same behaviour as the local ones, but have a
global visibility.  The same comments can be applied here.

>Release-Note:
>Audit-Trail:
>Unformatted: