From bc1746bccbe8082dd1cb135309b910fa1e10e9ca Mon Sep 17 00:00:00 2001 From: tg Date: Tue, 8 Aug 2017 20:50:34 +0000 Subject: [PATCH] comment --- dot.mkshrc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dot.mkshrc b/dot.mkshrc index cca9a0f..23b0a09 100644 --- a/dot.mkshrc +++ b/dot.mkshrc @@ -1,5 +1,5 @@ # $Id$ -# $MirOS: src/bin/mksh/dot.mkshrc,v 1.118 2017/08/08 20:42:16 tg Exp $ +# $MirOS: src/bin/mksh/dot.mkshrc,v 1.119 2017/08/08 20:50:34 tg Exp $ #- # Copyright (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010, # 2011, 2012, 2013, 2014, 2015, 2016, 2017 @@ -73,6 +73,7 @@ fi \: "${MKSH:=$(\\builtin whence -p mksh)}${MKSH:=/bin/mksh}" \\builtin export MKSH +# prompts PS4='[$EPOCHREALTIME] '; PS1='#'; (( USER_ID )) && PS1='$'; PS1=$'\001\r''${| \\builtin typeset e=$? @@ -86,6 +87,8 @@ PS4='[$EPOCHREALTIME] '; PS1='#'; (( USER_ID )) && PS1='$'; PS1=$'\001\r''${| \\builtin return $e } '"$PS1 " + +# utilities \\builtin alias doch='sudo mksh -c "$(\\builtin fc -ln -1)"' \\builtin command -v rot13 >/dev/null || \\builtin alias rot13='tr \ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ \ @@ -103,6 +106,7 @@ else } fi +# NUL-safe and EBCDIC-safe hexdump (from stdin) function hd_mksh { \\builtin typeset -Uui16 -Z11 pos=0 \\builtin typeset -Uui16 -Z5 hv=2147483647 @@ -593,6 +597,11 @@ function enable { \: place customisations below this line +# some defaults follow — you are supposed to adjust these to your +# liking; by default we add ~/.etc/bin and ~/bin (whichever exist) +# to $PATH, set $SHELL to mksh, set some defaults for man and less +# and show a few more possible things for users to begin moving in + for p in ~/.etc/bin ~/bin; do [[ -d $p/. ]] || \\builtin continue [[ $PATHSEP$PATH$PATHSEP = *"$PATHSEP$p$PATHSEP"* ]] || \