Thread View: gnu.bash.bug
2 messages
2 total messages
Started by Charles Karney
Tue, 27 Feb 1990 20:48
Bash: unwanted misfeature; wanted features
Author: Charles Karney
Date: Tue, 27 Feb 1990 20:48
Date: Tue, 27 Feb 1990 20:48
21 lines
1379 bytes
1379 bytes
bash 1.04, Sun OS 4.0.3, SPARCstation, gcc-compiled... My home directory is /u/karney. This is a symbolic link to /usr1/karney. /etc/passwd lists my shell as /bin/bash. When I log in, PWD is /usr1/karney. I think it should be /u/karney. Similarly whenever I create a new subshell the links are followed (effectively making PWD=`pwd`). Next two features are suggested by tcsh: I'd like to be able to specify a command to be run on every cd, pushd, popd. (So I can put the current directory into the title of my xterm window.) I'd like pushd +n to rotate the top n+1 elements of dirs by 1. (Currently it rotates all the elements by -n.) That way useless directories migrate to the end of dirs. Charles Karney Plasma Physics Laboratory E-mail: Karney@ccc.nmfecc.gov Princeton University Phone: +1 609 243 2607 Princeton, NJ 08543-0451 FAX: +1 609 243 2160
Bash: unwanted misfeature; wanted features
Author: Brian Fox
Date: Tue, 27 Feb 1990 23:48
Date: Tue, 27 Feb 1990 23:48
26 lines
1134 bytes
1134 bytes
Date: Tue, 27 Feb 90 15:48:45 EST
From: karney%SS01.PPPL.GOV@ccc.nmfecc.gov (Charles Karney)
Reply-To: Karney@ccc.nmfecc.gov
I'd like to be able to specify a command to be run on every cd, pushd,
popd. (So I can put the current directory into the title of my xterm
window.)
In my .bashrc:
xtitle () { echo -n -e "\033]l$*\033" }
function cd_xtitle () {
if [ "$cd_xtitle_pwd" != "$PWD" ]; then
if [ -z "$tty" ]; then tty=`tty | sed -e s:/dev/ttyp::`; fi
xtitle "$HOST:$PWD (${tty})"
cd_xtitle_pwd=$PWD
fi
}
case $TERM in
xterm | hpterm)
PROMPT_COMMAND=cd_xtitle
;;
esac
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads