/usr/share/doc/iselect/examples/chdir/dot.bashrc is in iselect 1.4.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | ##
## .bashrc snippet for iSelect-based 'cd' command
## Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved.
##
# database scan
cds () {
(cd $HOME;
find . -type d -print |\
sed -e "s;^\.;$HOME;" |\
sort -u >$HOME/.dirs ) &
}
# enhanced cd command
cd () {
if [ -d $1 ]; then
builtin cd $1
else
builtin cd `egrep "/$1[^/]*$" $HOME/.dirs |\
iselect -a -Q $1 -n "chdir" -t "Change Directory to..."`
fi
PS1="\u@\h:$PWD\n:> "
}
# make sure we stay at $HOME and
# that prompt gets initialized
cd
# change to parent dir
alias -- -='cd ..'
# change to last dir
alias .='cd $OLDPWD'
##EOF##
|