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 14bind '"\e[2~":paste-from-clipboard' 15bind '"\e[3~":delete-char' 16bind '"\e[4~":end-of-line' 17bind '"\e[5~":history-search-forward' 18bind '"\e[6~":history-search-backward' 19 20alias ls="ls --color" 21alias ll="ls -l" 22alias la="ls -A" 23 24# 25# and now we include a few useful things... 26# 27 28# 29# An almost-ksh compatible `whence' command. This is as hairy as it is 30# because of the desire to exactly mimic ksh. 31# 32# This depends somewhat on knowing the format of the output of the bash 33# `builtin type' command. 34# 35# Chet Ramey 36# chet@ins.CWRU.Edu 37# 38whence() 39{ 40 local vflag= path= 41 42 if [ "$#" = "0" ] ; then 43 echo "whence: argument expected" 44 return 1 45 fi 46 case "$1" in 47 -v) vflag=1 48 shift 1 49 ;; 50 -*) echo "whence: bad option: $1" 51 return 1 52 ;; 53 *) ;; 54 esac 55 56 if [ "$#" = "0" ] ; then 57 echo "whence: bad argument count" 58 return 1 59 fi 60 61 for cmd 62 do 63 if [ "$vflag" ] ; then 64 echo $(builtin type $cmd | sed 1q) 65 else 66 path=$(builtin type -path $cmd) 67 if [ "$path" ] ; then 68 echo $path 69 else 70 case "$cmd" in 71 /*) if [ -x "$cmd" ]; then 72 echo "$cmd" 73 fi 74 ;; 75 *) case "$(builtin type -type $cmd)" in 76 "") ;; 77 *) echo "$cmd" 78 ;; 79 esac 80 ;; 81 esac 82 fi 83 fi 84 done 85 return 0 86} 87 88alias which='whence' 89 90function dir { 91 ls -lF "$@"; 92} 93