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