conf/153233: [patch] skel/dot.shrc: use prompt escapes, comment out emacs line editor

Anonymous swell.k at gmail.com
Fri Dec 17 00:30:12 UTC 2010


>Number:         153233
>Category:       conf
>Synopsis:       [patch] skel/dot.shrc: use prompt escapes, comment out emacs line editor
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 17 00:30:12 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Anonymous
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
>Environment:
- prompt escapes were added to sh(1) in r142845
- set -o emacs is enabled by default per r206182
>Description:
Use PS1 that looks exactly like the one used in shells/bash by default.
>How-To-Repeat:
>Fix:
--- a.diff begins here ---
Index: share/skel/dot.shrc
===================================================================
--- share/skel/dot.shrc	(revision 216473)
+++ share/skel/dot.shrc	(working copy)
@@ -14,11 +14,11 @@
 # umask	022
 
 # Enable the builtin emacs(1) command line editor in sh(1),
-# e.g. C-a -> beginning-of-line.
-set -o emacs
+# e.g. C-a -> beginning-of-line. (default for interactive shell)
+# set -o emacs
 
-# Uncomment this and comment the above to enable the builtin vi(1) command
-# line editor in sh(1), e.g. ESC to go into visual mode.
+# Enable the builtin vi(1) command line editor in sh(1),
+# e.g. ESC to go into visual mode.
 # set -o vi
 
 
@@ -36,12 +36,8 @@
 # alias rm='rm -i'
 
 
-# # set prompt: ``username at hostname$ '' 
-# PS1="`whoami`@`hostname | sed 's/\..*//'`"
-# case `id -u` in
-# 	0) PS1="${PS1}# ";;
-# 	*) PS1="${PS1}$ ";;
-# esac
+# # set prompt: ``[username at hostname directory]$ '' 
+# PS1="[$(id -un)@\h \w]\\$ "
 
 # search path for cd(1)
 # CDPATH=.:$HOME
--- a.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list