-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.kshrc
62 lines (54 loc) · 876 Bytes
/
.kshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
export EDITOR=/bin/vi
export HOSTNAME=`hostname -g`
export TTY=${TTY:-`tty`}
case "$TTY" in
("not a tty"|""|"tty:"*)
export HISTFILE=$HOME/.ksh_hist_${HOSTNAME}
;;
(*)
export BNAME=`basename $TTY`
export HISTFILE=$HOME/.ksh_hist_${HOSTNAME}_$BNAME
;;
esac
export PS1="\$PWD>"
dd=`date +"%m_%d_%y"`
hn=`uname -n`
#ulimit 1100000
# Get rid of the old histfile
rm -f $HISTFILE
set -o vi
alias md="mkdir"
OS=s390
function pushd
{
CPWD=$PWD:$CPWD
if [ "$1" != "" ]
then
cd $1
fi
}
function popd
{
if [ "$CPWD" = "" ]
then
echo "directory stack is empty."
return 1
fi
cd ${CPWD%%:*}
CPWD=${CPWD#*:}
}
function queued
{
if [[ "$CPWD" != "" ]]
then
echo $(echo $CPWD | sed 's!:/!\\n/!g; s/://g' )
else
echo "directory stack is empty."
fi
}
function swapd
{
_CPWD_=${CPWD%%:*}
CPWD="${PWD}:${CPWD#*:}"
cd $_CPWD_
}