Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jun 1997 20:40:31 +0200 (MET DST)
From:      Wolfgang Helbig <helbig@MX.BA-Stuttgart.De>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   conf/3740: use ENV file for sh(1)
Message-ID:  <199706011840.UAA03320@helbig.informatik.ba-stuttgart.de>
Resent-Message-ID: <199706011850.LAA00703@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         3740
>Category:       conf
>Synopsis:       use ENV file for sh(1)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun  1 11:50:01 PDT 1997
>Last-Modified:
>Originator:     Wolfgang Helbig
>Organization:
>Release:        FreeBSD 3.0-CURRENT i386
>Environment:

	

>Description:

        The default .profile file defines some very useful aliases
	and shell flags like -o emacs. But these settings are effective
	for login shells only, i. e. after su(1) or starting the shell in
	an xterm(1), you'll have to reenter the environment. So I suggest
	to use the ENV feature of the shell.
	In the Fix section you'll find a diff for the dot.profile and a
	new file dot.shrc.

>How-To-Repeat:

	

>Fix:

Index: dot.profile
===================================================================
RCS file: /usr/cvsroot/src/share/skel/dot.profile,v
retrieving revision 1.11
diff -c -r1.11 dot.profile
*** dot.profile	1997/03/08 16:35:39	1.11
--- dot.profile	1997/06/01 18:24:31
***************
*** 22,56 ****
  #
  # umask	022
  
! # Uncomment next line to enable the builtin emacs(1) command line editor
! # in sh(1), e.g. C-a -> beginning-of-line.
! # set -o emacs
! 
! 
! # some useful aliases
! alias h='fc -l'
! alias j=jobs
! alias m=$PAGER
! alias ll='ls -lagFo'
! alias l='ls -l'
! alias g='egrep -i'
!  
! # # be paranoid
! # alias cp='cp -ip'
! # alias mv='mv -i'
! # alias rm='rm -i'
! 
! 
! # # 8-bit locale (English, USA), to read umlauts in vi(1).
  # LANG=en_US.ISO_8859-1; export LANG
   
! 
! # # set prompt: ``username@hostname$ '' 
! # PS1="`whoami`@`hostname | sed 's/\..*//'`"
! # case `id -u` in
! # 	0) PS1="${PS1}# ";;
! # 	*) PS1="${PS1}$ ";;
! # esac
! 
! # search path for cd(1)
! # CDPATH=.:$HOME
--- 22,29 ----
  #
  # umask	022
  
! # 8-bit locale (English, USA), to read umlauts in vi(1).
  # LANG=en_US.ISO_8859-1; export LANG
   
! # set ENV to a file invoked each time sh is started for interactive use.
! ENV=$HOME/.shrc;	export ENV


---------------- here comes dot.shrc ---------------------------------------
#
# .shrc - ENV file for /bin/sh
#
# This file will be used if the shell is invoked for interactive use and
# the environment variable ENV is set to this file.
#
# see also sh(1), environ(7).
#	$Id$
#


# Uncomment next line to enable the builtin emacs(1) command line editor
# in sh(1), e.g. C-a -> beginning-of-line.
# set -o emacs


# some useful aliases
alias h='fc -l'
alias j=jobs
alias m=$PAGER
alias ll='ls -laFo'
alias l='ls -l'
alias g='egrep -i'
 
# # be paranoid
# alias cp='cp -ip'
# alias mv='mv -i'
# alias rm='rm -i'

# # set prompt: ``username@hostname$ '' 
# PS1="`whoami`@`hostname | sed 's/\..*//'`"
# case `id -u` in
# 	0) PS1="${PS1}# ";;
# 	*) PS1="${PS1}$ ";;
# esac

# search path for cd(1)
# CDPATH=.:$HOME
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706011840.UAA03320>