[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: spaces in filenames
- To: "Nadav Har'El" <nyh(at-nospam)math.technion.ac.il>
- Subject: Re: spaces in filenames
- From: Oleg Goldshmidt <ogoldshmidt(at-nospam)comgates.co.il>
- Date: 26 Dec 2000 20:15:39 +0200
- Cc: linux-il(at-nospam)linux.org.il
- Delivered-To: linux.org.il-linux-il@linux.org.il
- In-Reply-To: "Nadav Har'El"'s message of "Tue, 26 Dec 2000 18:46:11 +0200"
- References: <m3g0jbp3ce.fsf@erwin.comgates.co.il><20001226184611.A6328@leeor.math.technion.ac.il>
- Sender: ogoldshmidt(at-nospam)comgates.co.il
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
- User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)
"Nadav Har'El" <nyh@math.technion.ac.il> writes:
> Do you have a 'cd' function in your .bashrc? ;)
>
> It appears that in your own account (but not root), you have a cd function
> (e.g., that shows the current directory on a window's title), which perhaps
> uses $* and distroys the shell's space handling. If this is indeed the case,
> try to replace $* by "$@" (the quotes are important), and see if it fixes the
> problem.
Brilliant! Stupid me! I had
# let the xterm titlebar show the current dir
xtitle() {
if [ "$TERM" = "xterm" ]; then
echo -n -e "\033]0;$@\007" >/dev/tty
fi
}
# Change the 'cd' 'pushd' 'popd' commands to use xtitle()
cd() {
builtin cd "$@"
xtitle ${HOSTNAME%%.*}: $PWD
}
in .bashrc! Thanks!
> P.S. how do you see the list of functions defined in bash? In zsh you have
> the 'functions' builtin. Is there a similar builtin in bash?
In a manner similar to ksh. From "man bash":
Function names and definitions may be listed with the -f
option to the declare or typeset builtin commands. The -F
option to declare or typeset will list the function names
only.
--
Oleg Goldshmidt | Comgates Ltd. | ogoldshmidt@NOSPAM.comgates.co.il
"... We work by wit, and not by witchcraft;
And wit depends on dilatory time." [Shakespeare]
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il