Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Saying 'ls' doesn't help!' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Saying 'ls' doesn't help!
Authored by: Anonymous on Feb 07, '02 07:38:35PM

OK, I want to know exactly what good you guys think it is for the title bar to say 'ls'. It gives me NO useful information at all. Now can any of you *nix wizards figure out a way to put the path up there, so it says 'ls /Applications/' for example? That would be very nice.



[ Reply to This | # ]
More form the Howto
Authored by: hysterion on Feb 07, '02 08:15:15PM
Actually, the referenced howto also gives a clever way to put the working directory in the title bar, flexible enough that you can have it exactly as in Terminal.app's default prompt. (That is, limit it to the last 3 components of the path, and replace $HOME by ~.) Again this works on the Mac, and can be done as follows. Create a file named 'rc.mine' in ~/Library/init/tcsh/; edit it to contain this line:
set prompt = "%{^[]0;%c3^G%}[%m:%c3] %n%# "
where again ^[ and ^G are typed as escape sequences; and save. If you have both this rc.mine and the suggested aliases.mine, then... well, see for yourself :-)

(Incidentally, does anyone know if and how one can type those escape sequences in TextEdit, or BBEdit?)



[ Reply to This | # ]
Saying 'ls' doesn't help!
Authored by: bdestena on Mar 02, '02 06:24:23PM

I found out how to get the directory path in the terminal app
I'm using a zsh, just put this in your .zshrc file:

#Title bar displaying the current directory path
precmd () { print -Pn 'e]0;%~a' }

you can replace precmd by chpwd but you wont get a directory path in the title bar before you change directories once.

for a tcsh something like:
alias precmd 'echo -n "



[ Reply to This | # ]