[OS X TeX] path before prompt

Roussanka Loukanova rloukano at stp.lingfil.uu.se
Mon Feb 18 15:58:43 CET 2008


On Mon, 18 Feb 2008, Bruno Voisin wrote:

> Le 18 févr. 08 à 15:02, Roussanka Loukanova a écrit :
>
>> Accept my apology for this question, but which is the good choice and why? 
>> I guess the default set up (i.e., 'W') should have some good rationality 
>> behind.
>
> The old choice used to put the whole path to the current directory (starting 
> from ~) before the prompt. As a result, this path occupied most of the 
> current line in the Terminal window (if there was more than 3 levels say in 
> the path) and any text typed after the prompt was partly superposed on this 
> path, making it undecipherable and unusable for copy/paste.
>
> In order to avoid that, you needed to make the Terminal window as wide as 
> possible which was not always an option on small screens. It would have been 
> better to have the supplementary text flowed to the next line instead of 
> being superposed at the beginning of the current line, but if there was an 
> option for that I have no idea what it was.

Yes, I've been experiencing such inconveniences. On the other hand, having 
the path starting from the "~" sign (or the topmost "/") down to the 
current directory is quite helpful for knowing where one is at the current 
moment.

Now I've recalled that I did something for that under Linux. There was 
some reason to do the resettings in .bashrc rather than in .bash_profile. 
So, under Linux, I see that I have in .bashrc

# Set the prompter.
export PS1='\u@\h \w\$> '

Then .bash_profile calls .bashrc by including the following lines in it:

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
         . ~/.bashrc
fi

I have such .bash_profile under OS X 10.4 too, just for a couple of 
aliases warning for rm and mainly for setting the PATH:

export PATH=$PATH:$HOME/bin

I guess something like the above for Linux should be set in Leopard, 
if one wants a detailed prompt. Despite of the inconvenience that Bruno 
explains, I find the prompt showing the path to the current directory 
practical and most likely would like to set it up under Leopard (hoping 
that the upgrade will go finely...).

> Now with Leopard this nonsense is at last gone!

Hm, may be you are right and I should just try to work with the default 
setting.

Do we need to set up the PATH, with export PATH=$PATH:$HOME/bin
(as we do in 10.4) in Leopard?

Roussanka

>
> Bruno Voisin



More information about the macostex-archives mailing list