Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Add contents in existing precmd



On Jan 19,  3:00pm, Bruno Bonfils wrote:
}
} how to prevent $HOST and $PWD will be replace with value ?

You can switch back and forth between double and single quotes:

        eval "function precmd () { 
                $functions[precmd]"'
                title $HOST $PWD
        }'

Or you can put backslashes before the individual dollar signs, but
if there are more than a few of them that might get tiresome:

        eval "function precmd () { 
                $functions[precmd]
                title \$HOST \$PWD
        }"

There are probably half a dozen other ways to do it as well.

This is all very basic shell syntax, with which you ought to become
familiar ...



Messages sorted by: Reverse Date, Date, Thread, Author