Hey, I know this is a very old thread, but I wanted to thank you for
posting this set of functions. I was looking into how to set the prompt to
the CWD this this morning. This is exactly what I was looking for, and I've
learned a lot about rc from reading it. This is why I never delete emails :)

On Thu, Jan 24, 2019 at 11:25 AM Federico Benavento <benave...@gmail.com>
wrote:

> Here, this is what I have.
>
> fn setprompt {
>         # delete old function
>         fn $ps1
>         PWD=`{pwd}
>         ps1='['^$sysname^':'^`{basename $PWD}^']%'
>         prompt=($ps1^' ' '      ')
>         fn $ps1 { if(! ~ $#* 0) $* }
>
>         # macOS Terminal Title
>         printf '\033]7;%s\007'  file://^`{hostname}^$PWD
> }
>
> fn cd {
>         builtin cd $* &&
>         setprompt
> }
>
>
>
> > On Jan 23, 2019, at 7:32 PM, Federico Benavento <benave...@gmail.com>
> wrote:
> >
> > Yes, you can, I think I even set the title of the terminal window when I
> cd. I’m not at home now, i’ll post my rcrc once I get a chance.
> >> On 23 Jan 2019, at 19:11, Calvin Morrison <mutanttur...@gmail.com>
> wrote:
> >>
> >> feature i would ove: something equiv to a PS1 line so i know what
> >> folder i'm in. Can I do that with $prompt?
>
> —-
> Federico G. Benavento
> benave...@gmail.com
>
>
>
>
>
>

------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T8d01fc920442b33e-Md7531bfbc330e5d3ffc97122
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to