From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <9afc64abd4eb160a7ca1fba4ea8c795c@krabbe.dyndns.org> References: <9afc64abd4eb160a7ca1fba4ea8c795c@krabbe.dyndns.org> From: Ryan Gonzalez Date: Fri, 12 Jun 2015 16:05:21 -0500 Message-ID: To: Ingo Krabbe Content-Type: multipart/alternative; boundary=20cf307abdc98618790518587830 Cc: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Subject: Re: [9fans] Trying to override 'cd' command Topicbox-Message-UUID: 582e2540-ead9-11e9-9d60-3106f5b1d025 --20cf307abdc98618790518587830 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks for replying! Unfortunately, that doesn't change anything. Still stuck at the 'term% ' prompt. On Sun, Jun 7, 2015 at 6:43 PM, Ingo Krabbe wrote: > try it with > > fn cd{ > builtin cd $1 > prompt=3D(`{pwd}^'% ' ' ') > } > > the difference is `{pwd} not '{pwd}. > > > > > Coming from a bash world, I really like knowing what directory I'm in a= t > > the prompt. I tried putting this at the end of 'lib/profile': > > > > > > > > fn cd{ > > builtin cd $1 > > prompt=3D('{pwd}^'% ' ' ') > > } > > > > cd $HOME > > > > > > > > However, it doesn't work! The 'cd' command seems to do what it normally > > does. The prompt stays at 'term% '. Does nothing. > > > > -- > > Ryan > > [ERROR]: Your autotools build scripts are 200 lines longer than your > > program. Something=E2=80=99s wrong. > > http://kirbyfan64.github.io/ > > > --=20 Ryan [ERROR]: Your autotools build scripts are 200 lines longer than your program. Something=E2=80=99s wrong. http://kirbyfan64.github.io/ --20cf307abdc98618790518587830 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks for replying! Unfortunately, that doesn't chang= e anything. Still stuck at the 'term% ' prompt.


On Sun, Jun 7, 2= 015 at 6:43 PM, Ingo Krabbe <ikrabbe.ask@gmail.com> wrot= e:
try it with

fn cd{
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 builtin cd $1
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 prompt=3D(`{pwd}^'% ' = 9;=C2=A0 =C2=A0 ')
}

the difference is `{pwd} not '{pwd}.



> Coming from a bash world, I really like knowing what directory I'm= in at
> the prompt. I tried putting this at the end of 'lib/profile':<= br> >
>
>
> fn cd{
>=C2=A0 =C2=A0 =C2=A0builtin cd $1
>=C2=A0 =C2=A0 =C2=A0prompt=3D('{pwd}^'% ' '=C2=A0 =C2= =A0 ')
> }
>
> cd $HOME
>
>
>
> However, it doesn't work! The 'cd' command seems to do wha= t it normally
> does. The prompt stays at 'term% '. Does nothing.
>
> --
> Ryan
> [ERROR]: Your autotools build scripts are 200 lines longer than your > program. Something=E2=80=99s wrong.
> http://kirbyfan64.github.io/





--
=
Ryan
[ERROR]: Your autot= ools build scripts are 200 lines longer than your program. Something=E2=80= =99s wrong.
--20cf307abdc98618790518587830--