[Midnightbsd-cvs] src: share/skel: add mksh file.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Thu Aug 30 23:08:39 EDT 2007
Log Message:
-----------
add mksh file.
Modified Files:
--------------
src/share/skel:
Makefile (r1.3 -> r1.4)
Added Files:
-----------
src/share/skel:
dot.mkshrc (r1.1)
-------------- next part --------------
--- /dev/null
+++ share/skel/dot.mkshrc
@@ -0,0 +1,42 @@
+: ${EDITOR:=/bin/ed} ${TERM:=vt100} ${HOSTNAME:=$(ulimit -c 0;hostname -s 2>&-)}
+[[ $HOSTNAME = @(localhost|*([ ])) ]] && HOSTNAME=$(ulimit -c 0;hostname 2>&-)
+: ${HOSTNAME:=nil}; PS1='#'; [[ "$(ulimit -c 0; id -u 2>&-)" -eq 0 ]] || PS1='$'
+PS1='$(((e = $?)) && print $e\|)${USER:=$(ulimit -c 0; id -un 2>&- || \
+ print nobody)}@${HOSTNAME%%.*}:$(typeset pfx=~ wd=${PWD:-?}
+ typeset -i n=${COLUMNS:-80}/3; let n="n < 7 ? 7 : n"
+ [[ ${wd#$pfx} = $wd || $pfx = ?(/) ]] || wd=\~${wd#$pfx}
+ pfx=; while (( (${#pfx} + ${#wd}) > n )); do
+ if [[ $wd = */* ]]; then
+ pfx=.../
+ wd=${wd#*/}
+ else
+ pfx=...
+ wd=${wd#?????}
+ fi
+ done; print -r -- "$pfx$wd") '"$PS1 "
+export EDITOR HOSTNAME MKSH=$(whence -p mksh) PS1 TERM USER
+
+alias l='/bin/ls -F'
+alias la='l -a'
+alias ll='l -l'
+alias lo='la -lo'
+alias which='whence -p'
+whence -p rot13 >&- || alias rot13='tr [A-Za-z] [N-ZA-Mn-za-m]'
+whence -p hd >&- || function hd {
+ hexdump -e '"%08.8_ax " 8/1 "%02X " " - " 8/1 "%02X "' \
+ -e '" |" "%_p"' -e '"|\n"' "$@"
+}
+
+# strip comments (and leading/trailing whitespace if IFS is set) from
+# any file(s) given as argument, or stdin if none, and spew to stdout
+function Lstripcom {
+ cat "$@" | { set -o noglob; while read _line; do
+ _line=${_line%%#*}
+ [[ -n $_line ]] && print -r -- $_line
+ done; }
+}
+
+# place customisations between this line and the “: RCSID” line below
+
+: $MirOS: src/bin/mksh/dot.mkshrc,v 1.18 2007/07/26 13:37:21 tg Rel $
+: $MidnightBSD: src/share/skel/dot.mkshrc,v 1.1 2007/08/31 03:08:38 laffer1 Exp $
Index: Makefile
===================================================================
RCS file: /home/cvs/src/share/skel/Makefile,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lshare/skel/Makefile -Lshare/skel/Makefile -u -r1.3 -r1.4
--- share/skel/Makefile
+++ share/skel/Makefile
@@ -3,8 +3,8 @@
# $MidnightBSD$
FILESGROUPS= FILES1 FILES2
-FILES1= dot.cshrc dot.login dot.login_conf dot.mailrc dot.profile \
- dot.shrc
+FILES1= dot.cshrc dot.login dot.login_conf dot.mailrc dot.mkshrc \
+ dot.profile dot.shrc
FILES2= dot.mail_aliases dot.rhosts
FILES1DIR= /usr/share/skel
FILES2DIR= /usr/share/skel
More information about the Midnightbsd-cvs
mailing list