# @(#).shrc	1.10 20/01/27 Copyright 2015-2020 J. Schilling
# echo .shrc

#
# Add /opt/schily/bin to PATH
#
case "$PATH" in
*/opt/schily/bin*)	;;
*)			PATH="$PATH":/opt/schily/bin
esac

#
# Add $HOME/bin to PATH
#
case "$PATH" in
*$HOME/bin*)		;;
*)			PATH=~/bin:"$PATH"
esac
export PATH

PAGER='p -b'
export PAGER
EDITOR=ved-e
export EDITOR
GREGORIAN=+P		# Switch our cal(1) into Prussian mode, Berlin
export GREGORIAN	# uses the Gregorian calendar since 1612/08/23

SAVEHISTORY=on

TF='%6:E real %6U user %6S sys %P%% cpu %I+%Oio %Fpf+%Ww'
TIMEFORMAT=$TF

#
# Must be last as FreeBSD ash does not like this
#
case "${.sh.version}" in

*pbosh*)
	set -o globalaliases	# comment out if pbosh was compiled without
	set -o localaliases	# comment out if pbosh was compiled without
	;;
*bosh*|*version*)
	case "$0" in
	bosh|-bosh)
		case "${.sh.path}" in
		/usr/bin/*)
			SHELL=/usr/bin/bosh	# avoid /usr/bin/amd64/bosh
			;;
		'')				# unavailable, do not set SHELL
			;;
		/*)				# a valid absolute path name,
			SHELL=${.sh.path}	# may be /opt/schily/bin/sh
			;;
		esac
		;;
	*)
		SHELL=/opt/schily/bin/bosh
		;;
	esac
	export SHELL
	set -o globalaliases	# Enable persistent global aliases in ~/.globals
	set -o localaliases	# Enable persistent local aliases in .locals

	set -o fdpipe		# permit "cmd1 2| more" to pipe e.g. stderr
	set -o hostprompt	# Set PS1 to: "<hostname> <username>> "
	set -o hashcmds		# Enable hash commands for alias management
				# Warning: shell comment in this script now
				# needs a space after the '#' character or it
				# will be seen as a hash command, see bosh(1).

	set -o time	# Must be last, or you would get timing for .shrc cmds
	;;
*)	;;
esac 2> /dev/null	# Redirect FreeBSD ash error message
