[arch-general] Dynamic Titles in urxvt (bash) Without Side Effects?

Bastien Dejean nihilhill at gmail.com
Wed Nov 16 08:51:11 EST 2011


Hey,

I've added the following lines to my .bashrc:

    case "$TERM" in
        rxvt*|xterm*)
            set -o functrace
            trap '[ -z "$BASH_SOURCE" ] && printf "%b" "\e]0;$BASH_COMMAND\a"' DEBUG >& /dev/null
            ;;
    esac

(It sets the current title of the current window according to the last
ran command.)

But alas, it generates side effects, if I issue this:

    ls "$(ls -1 | head -1)"

I get:

    ls: cannot access foo.bar: No such file or directory

Strange or trivial?

Cheers,
-- 
Bastien


More information about the arch-general mailing list