"Nadav Har'El" <[EMAIL PROTECTED]> 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. | [EMAIL PROTECTED] 
"... We work by wit, and not by witchcraft;
 And wit depends on dilatory time." [Shakespeare]

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to