1# 2# Administrative startup for /bin/sh 3# Place user customizations in /.profile 4# 5 6echo -e "\nWelcome to the Haiku shell.\n" 7 8# switch to $HOME 9cd 10 11export PS1="\w> " 12export HISTFILESIZE=50 13 14alias ls="ls --color" 15alias ll="ls -l" 16alias la="ls -A" 17alias lal="ls -Al" 18alias m="more" 19 20# 21# and now we include a few useful things... 22# 23 24# 25# An almost-ksh compatible `whence' command. This is as hairy as it is 26# because of the desire to exactly mimic ksh. 27# 28# This depends somewhat on knowing the format of the output of the bash 29# `builtin type' command. 30# 31# Chet Ramey 32# chet@ins.CWRU.Edu 33# 34whence() 35{ 36 local vflag= path= 37 38 if [ "$#" = "0" ] ; then 39 echo "whence: argument expected" 40 return 1 41 fi 42 case "$1" in 43 -v) vflag=1 44 shift 1 45 ;; 46 -*) echo "whence: bad option: $1" 47 return 1 48 ;; 49 *) ;; 50 esac 51 52 if [ "$#" = "0" ] ; then 53 echo "whence: bad argument count" 54 return 1 55 fi 56 57 returnValue=0 58 59 for cmd 60 do 61 if [ "$vflag" ] ; then 62 echo $(builtin type $cmd | sed 1q) 63 else 64 path=$(builtin type -path $cmd) 65 if [ "$path" ] ; then 66 echo $path 67 else 68 case "$cmd" in 69 */*) if [ -x "$cmd" ]; then 70 echo "$cmd" 71 else 72 returnValue=1 73 fi 74 ;; 75 *) case "$(builtin type -type $cmd)" in 76 "") returnValue=1 77 ;; 78 *) echo "$cmd" 79 ;; 80 esac 81 ;; 82 esac 83 fi 84 fi 85 done 86 return $returnValue 87} 88 89alias which='whence' 90 91function dir { 92 ls -lF "$@"; 93} 94