Imported from ../bash-2.0.tar.gz.
This commit is contained in:
parent
726f63884d
commit
ccc6cda312
502 changed files with 91988 additions and 69123 deletions
|
|
@ -13,7 +13,6 @@ alias j="jobs -l"
|
|||
alias l="ls -l "
|
||||
alias ll="ls -l"
|
||||
alias ls="ls -F"
|
||||
alias term='set noglob; eval `tset -Q -s `'
|
||||
alias pu="pushd"
|
||||
alias po="popd"
|
||||
|
||||
|
|
@ -53,11 +52,12 @@ seq ()
|
|||
{
|
||||
local lower upper output;
|
||||
lower=$1 upper=$2;
|
||||
|
||||
if [ $lower -ge $upper ]; then return; fi
|
||||
while [ $lower -le $upper ];
|
||||
do
|
||||
output="$output $lower";
|
||||
lower=$[ $lower + 1 ];
|
||||
done;
|
||||
echo $output
|
||||
echo -n "$lower "
|
||||
lower=$(($lower + 1))
|
||||
done
|
||||
echo "$lower"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
#
|
||||
default_dir=/usr/local/lib/
|
||||
|
||||
if [ "$PS1" ]; then
|
||||
PS1='\u@\h(\#)$ '
|
||||
ignoreeof=3
|
||||
if [ -n "$PS1" ]; then
|
||||
PS1='\u@\h(\#)\$ '
|
||||
IGNOREEOF=3
|
||||
fi
|
||||
|
||||
LOGIN_SHELL=true
|
||||
|
|
@ -12,9 +12,7 @@ LOGIN_SHELL=true
|
|||
# If the user has her own init file, then use that one, else use the
|
||||
# canonical one.
|
||||
if [ -f ~/.bashrc ]; then
|
||||
source ~/.bashrc
|
||||
else if [ -f ${default_dir}Bashrc ]; then
|
||||
source ${default_dir}Bashrc;
|
||||
fi
|
||||
. ~/.bashrc
|
||||
elif [ -f ${default_dir}Bashrc ]; then
|
||||
. ${default_dir}Bashrc;
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -16,57 +16,55 @@ X11=/usr/bin/X11
|
|||
|
||||
UTIL_PATH=$GNU:$X11
|
||||
STANDARD_PATH=/usr/local/bin:/usr/ucb:/bin:/usr/bin:/usr/etc:/etc:/usr/games
|
||||
if [ "$HOSTTYPE" = "sony" ]; then STANDARD_PATH=STANDARD_PATH:/usr/sony/bin; fi
|
||||
|
||||
if [ -d $HOME/bin/$HOSTTYPE ]; then
|
||||
MY_PATH=$HOME/bin/$HOSTTYPE
|
||||
MY_PATH=$HOME/bin/$HOSTTYPE
|
||||
fi
|
||||
|
||||
if [ -d $HOME/bin ]; then
|
||||
MY_PATH=$MY_PATH:$HOME/bin
|
||||
MY_PATH=$MY_PATH:$HOME/bin
|
||||
fi
|
||||
|
||||
if [ -d /usr/hosts ]; then
|
||||
STANDARD_PATH=$STANDARD_PATH:/usr/hosts
|
||||
STANDARD_PATH=$STANDARD_PATH:/usr/hosts
|
||||
fi
|
||||
|
||||
PATH=.:$MY_PATH:$UTIL_PATH:$STANDARD_PATH
|
||||
|
||||
# If running interactively, then:
|
||||
if [ "$PS1" ]; then
|
||||
|
||||
# Set ignoreeof if you don't want EOF as the sole input to the shell to
|
||||
# immediately signal a quit condition. This only happens at the start
|
||||
# of a line if the line is empty, and you haven't just deleted a character
|
||||
# with C-d. I turn this on in ~/.bash_profile so that only login shells
|
||||
# have the right to be obnoxious.
|
||||
# ignoreeof=
|
||||
|
||||
# Set auto_resume if you want to resume on "emacs", as well as on
|
||||
# "%emacs".
|
||||
auto_resume=
|
||||
|
||||
# Set notify if you want to be asynchronously notified about background
|
||||
# job completion.
|
||||
notify=
|
||||
|
||||
# Make it so that failed `exec' commands don't flush this shell.
|
||||
no_exit_on_failed_exec=
|
||||
|
||||
if [ ! "$LOGIN_SHELL" ]; then
|
||||
PS1="\u@\h\$ "
|
||||
fi
|
||||
|
||||
HISTSIZE=256
|
||||
MAILCHECK=60
|
||||
|
||||
# A couple of default aliases.
|
||||
alias j='jobs -l'
|
||||
alias po=popd
|
||||
alias pu=pushd
|
||||
alias ls='ls -F'
|
||||
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
source ~/.bash_aliases
|
||||
fi
|
||||
# If not running interactively, then return
|
||||
if [ -z "$PS1" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# Set ignoreeof if you don't want EOF as the sole input to the shell to
|
||||
# immediately signal a quit condition. This only happens at the start
|
||||
# of a line if the line is empty, and you haven't just deleted a character
|
||||
# with C-d. I turn this on in ~/.bash_profile so that only login shells
|
||||
# have the right to be obnoxious.
|
||||
# set -o ignoreeof
|
||||
|
||||
# Set auto_resume if you want to resume on "emacs", as well as on
|
||||
# "%emacs".
|
||||
auto_resume=exact
|
||||
|
||||
# Set notify if you want to be asynchronously notified about background
|
||||
# job completion.
|
||||
set -o notify
|
||||
|
||||
# Make it so that failed `exec' commands don't flush this shell.
|
||||
shopt -s execfail
|
||||
|
||||
if [ -z "$LOGIN_SHELL" ]; then
|
||||
PS1="\u@\h\$ "
|
||||
fi
|
||||
|
||||
HISTSIZE=256
|
||||
MAILCHECK=60
|
||||
|
||||
# A couple of default aliases.
|
||||
alias j='jobs -l'
|
||||
alias po=popd
|
||||
alias pu=pushd
|
||||
alias ls='ls -F'
|
||||
|
||||
[ -f ~/.bash_aliases ] && . ~/.bash_aliases
|
||||
|
|
|
|||
5
examples/startup-files/README
Normal file
5
examples/startup-files/README
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
Some sample startup files. The ones starting with capital letters
|
||||
are originally from Brian Fox. The ones starting with lowercase
|
||||
letters are from Chet Ramey.
|
||||
|
||||
They will require changes for your environment.
|
||||
|
|
@ -1,52 +1,37 @@
|
|||
HOME=/usr/homes/chet
|
||||
MAIL=/usr/homes/chet/mbox
|
||||
# This is the filename where your incoming mail arrives.
|
||||
MAIL=~/mbox
|
||||
MAILCHECK=30
|
||||
HISTFILE=/usr/homes/chet/.history
|
||||
|
||||
MACHINE=$(/usr/local/bin/machine)
|
||||
HOST=$(hostname)
|
||||
HISTFILE=~/.history/history.$HOSTNAME
|
||||
|
||||
PATH1=/usr/homes/chet/bin.$MACHINE:/usr/local/bin/gnu:
|
||||
PATH1=/usr/homes/chet/bin.$HOSTTYPE:/usr/local/bin/gnu:
|
||||
PATH2=/usr/local/bin:/usr/ucb:/bin:/usr/bin/X11:.
|
||||
PATH3=/usr/andrew/bin:/usr/bin:/usr/ibm:/usr/local/bin/mh:/usr/new/bin:
|
||||
PATH3=/usr/bin:/usr/new/bin:/usr/contrib/bin
|
||||
PATH=$PATH1:$PATH2:$PATH3
|
||||
|
||||
EDITOR=/usr/homes/chet/bin.$MACHINE/ce
|
||||
VISUAL=/usr/homes/chet/bin.$MACHINE/ce
|
||||
FCEDIT=/usr/homes/chet/bin.$MACHINE/ce
|
||||
EDITOR=/usr/local/bin/ce VISUAL=/usr/local/bin/ce FCEDIT=/usr/local/bin/ce
|
||||
|
||||
if [ "$BASH" ] ; then
|
||||
SHELL=$BASH
|
||||
else
|
||||
SHELL=/bin/bash
|
||||
fi
|
||||
|
||||
if [ "$MACHINE" = "ibm032" ] ; then
|
||||
stty erase ^H
|
||||
fi
|
||||
|
||||
PAGER=/usr/ucb/more
|
||||
NNTPSERVER=kiwi
|
||||
NS=/nfs/cwjcc/fs1/ns-engr/proj/netsrv/cwpub/proto/src
|
||||
SHELL=${SHELL:-${BASH:-/bin/bash}}
|
||||
|
||||
PAGER=/usr/local/bin/less
|
||||
LESS='-i -e -M -P%t?f%f :stdin .?pb%pb\%:?lbLine %lb:?bbByte %bb:-...'
|
||||
#
|
||||
# Bogus 1003.2 variables. This should really be in /etc/profile
|
||||
#
|
||||
LOGNAME=${USER-$(whoami)}
|
||||
TZ=EST5EDT
|
||||
TZ=US/Eastern
|
||||
|
||||
export HOME ENV VISUAL EDITOR MAIL SHELL PATH TERM
|
||||
export PAGER LESS TERMCAP HISTSZIE HISTFILE
|
||||
export MAIL MAILCHECK HOST HOSTNAME NNTPSERVER NS LOGNAME TZ
|
||||
export HOME VISUAL EDITOR MAIL SHELL PATH TERM
|
||||
export PAGER LESS TERMCAP HISTSIZE HISTFILE MAIL MAILCHECK LOGNAME TZ
|
||||
|
||||
PS1="${HOST}$ "
|
||||
PS1="${HOSTNAME}\$ "
|
||||
PS2='> '
|
||||
export PS1 PS2
|
||||
|
||||
umask 022
|
||||
|
||||
if [ -f /unix ] ; then
|
||||
stty intr ^c
|
||||
stty intr ^c # bogus
|
||||
fi
|
||||
|
||||
if [ -f ~/.bashrc ] ; then
|
||||
|
|
|
|||
|
|
@ -1,35 +1,35 @@
|
|||
if [ "$PS1" != "" ] ; then
|
||||
|
||||
if [ -f /unix ] ; then
|
||||
alias ls='/bin/ls -CF'
|
||||
alias ll='/bin/ls -lCF'
|
||||
alias dir='/bin/ls -bCalF'
|
||||
else
|
||||
alias ls='/bin/ls -F'
|
||||
alias ll='/bin/ls -lF'
|
||||
alias dir='/bin/ls -balF'
|
||||
if [ -z "$PS1" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# bogus
|
||||
if [ -f /unix ] ; then
|
||||
alias ls='/bin/ls -CF'
|
||||
else
|
||||
alias ls='/bin/ls -F'
|
||||
fi
|
||||
alias ll='ls -l'
|
||||
alias dir='ls -ba'
|
||||
|
||||
alias ss="ps -aux"
|
||||
alias mail=/usr/ucb/mail
|
||||
alias dot='ls .[a-zA-Z0-9]*'
|
||||
alias mroe=more
|
||||
alias pwd='echo $PWD'
|
||||
alias pdw='echo $PWD'
|
||||
alias news="xterm -g 80x45 -e rn -e &"
|
||||
alias back='cd $OLDPWD'
|
||||
alias manroff="nroff /usr/lib/tmac/tmac.an.4.3"
|
||||
alias laser="lpr -Palw2"
|
||||
alias lw="lpr -Palw2"
|
||||
alias dot='ls .[a-zA-Z0-9_]*'
|
||||
alias news="xterm -g 80x45 -e trn -e -S1 -N &"
|
||||
|
||||
alias c="clear"
|
||||
alias m="more"
|
||||
alias j="jobs"
|
||||
|
||||
# common misspellings
|
||||
alias mroe=more
|
||||
alias pdw=pwd
|
||||
|
||||
hash -p /usr/bin/mail mail
|
||||
|
||||
if [ -z "$HOST" ] ; then
|
||||
export HOST=`hostname`
|
||||
export HOST=${HOSTNAME}
|
||||
fi
|
||||
|
||||
history_control=ignoredups
|
||||
HISTIGNORE="[ ]*:&:bg:fg"
|
||||
|
||||
psgrep()
|
||||
{
|
||||
|
|
@ -57,10 +57,14 @@ term()
|
|||
tset
|
||||
}
|
||||
|
||||
xtitle ()
|
||||
{
|
||||
echo -n -e "\033]0;$*\007"
|
||||
}
|
||||
|
||||
cd()
|
||||
{
|
||||
builtin cd $*
|
||||
xtitle $HOST: $PWD
|
||||
builtin cd "$@" && xtitle $HOST: $PWD
|
||||
}
|
||||
|
||||
bold()
|
||||
|
|
@ -126,14 +130,3 @@ function chmog()
|
|||
chgrp $3 $4
|
||||
fi
|
||||
}
|
||||
|
||||
#
|
||||
# Source kshenv for ksh-compatibility definitions
|
||||
#
|
||||
|
||||
if [ -f ~/.kshenv ] ; then
|
||||
. ~/.kshenv
|
||||
fi
|
||||
|
||||
fi
|
||||
#end of .bashrc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue