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