From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 From: Ryan Gonzalez Date: Sun, 7 Jun 2015 18:29:46 -0500 Message-ID: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=bcaec5016137cbbde30517f5e766 Subject: [9fans] Trying to override 'cd' command Topicbox-Message-UUID: 57d389d2-ead9-11e9-9d60-3106f5b1d025 --bcaec5016137cbbde30517f5e766 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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': 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. --=20 Ryan [ERROR]: Your autotools build scripts are 200 lines longer than your program. Something=E2=80=99s wrong. http://kirbyfan64.github.io/ --bcaec5016137cbbde30517f5e766 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Coming from a bash world, I really like knowing what direc= tory I'm in at the prompt. I tried putting this at the end of 'lib/= profile':



fn cd{
=
=C2=A0 =C2=A0 builtin cd $1
=C2=A0 =C2=A0 prompt=3D('{pw= d}^'% ' ' =C2=A0 =C2=A0')
}

<= div>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 p= rogram. Something=E2=80=99s wrong.
--bcaec5016137cbbde30517f5e766-- From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <9afc64abd4eb160a7ca1fba4ea8c795c@krabbe.dyndns.org> To: , <9fans@9fans.net> Date: Mon, 8 Jun 2015 01:43:34 +0200 From: Ingo Krabbe In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] Trying to override 'cd' command Topicbox-Message-UUID: 57d821f4-ead9-11e9-9d60-3106f5b1d025 try it with=20 fn cd{ builtin cd $1 prompt=3D(`{pwd}^'% ' ' ') } the difference is `{pwd} not '{pwd}. =20 > 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': >=20 >=20 >=20 > fn cd{ > builtin cd $1 > prompt=3D('{pwd}^'% ' ' ') > } >=20 > cd $HOME >=20 >=20 >=20 > However, it doesn't work! The 'cd' command seems to do what it normally > does. The prompt stays at 'term% '. Does nothing. >=20 > --=20 > Ryan > [ERROR]: Your autotools build scripts are 200 lines longer than your > program. Something=E2=80=99s wrong. > http://kirbyfan64.github.io/ 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-- From mboxrd@z Thu Jan 1 00:00:00 1970 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-reply-to: Your message of "Fri, 12 Jun 2015 16:05:21 CDT." References: <9afc64abd4eb160a7ca1fba4ea8c795c@krabbe.dyndns.org> Date: Fri, 12 Jun 2015 14:35:43 -0700 From: Bakul Shah Message-Id: <20150612213543.513CAB827@mail.bitblocks.com> Subject: Re: [9fans] Trying to override 'cd' command Topicbox-Message-UUID: 5837d75c-ead9-11e9-9d60-3106f5b1d025 On Fri, 12 Jun 2015 16:05:21 CDT Ryan Gonzalez wrote: > > Thanks for replying! Unfortunately, that doesn't change anything. Still > stuck at the 'term% ' prompt. Invoke rc with -l flag (in acme middleclick on win rc -l). From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) From: Anthony Sorace In-Reply-To: Date: Fri, 12 Jun 2015 17:50:00 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <9afc64abd4eb160a7ca1fba4ea8c795c@krabbe.dyndns.org> To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Subject: Re: [9fans] Trying to override 'cd' command Topicbox-Message-UUID: 583c2f64-ead9-11e9-9d60-3106f5b1d025 It works: : root; fn cd {builtin cd $* ; prompt=3D(': '`{pwd}^'; ' ' = ')} : root; cd : /usr/a; cd /tmp : /tmp;=20 If you=E2=80=99re still having trouble, paste a transcript like that, so = we can see what=E2=80=99s going on. Note also that spaces in file names will screw up the easy version of = this. If you=E2=80=99re on a filesystem that likes such things, you = might instead want something like this: : /Library/Desktop; pwd =20 /Library/Desktop Pictures : /Library/Desktop; fn cd {builtin cd $* ; cwd=3D`{pwd} ; = prompt=3D(': '$"cwd^'; ' ' ')} : /Library/Desktop; cd . : /Library/Desktop Pictures;=20 > On Jun 12, 2015, at 17:05 , Ryan Gonzalez wrote: >=20 > Thanks for replying! Unfortunately, that doesn't change anything. = Still stuck at the 'term% ' prompt. >=20 From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: <9fans@9fans.net> Date: Sat, 13 Jun 2015 10:02:56 +0200 From: Ingo Krabbe In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] Trying to override 'cd' command Topicbox-Message-UUID: 584092b6-ead9-11e9-9d60-3106f5b1d025 I tried it in a fresh window, where it works for me. > Thanks for replying! Unfortunately, that doesn't change anything. Still > stuck at the 'term% ' prompt. >=20 >=20 > On Sun, Jun 7, 2015 at 6:43 PM, Ingo Krabbe wro= te: >=20 >> 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 i= n at >> > 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 norma= lly >> > 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 >=20 > --=20 > Ryan > [ERROR]: Your autotools build scripts are 200 lines longer than your > program. Something=E2=80=99s wrong. > http://kirbyfan64.github.io/ From mboxrd@z Thu Jan 1 00:00:00 1970 User-Agent: K-9 Mail for Android In-Reply-To: References: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----438H4MTUXF70PMWFFTQFAAW2FE7PJE" From: Ryan Gonzalez Date: Sat, 13 Jun 2015 12:22:47 -0500 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>, Ingo Krabbe Message-ID: Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Trying to override 'cd' command Topicbox-Message-UUID: 5845b2be-ead9-11e9-9d60-3106f5b1d025 ------438H4MTUXF70PMWFFTQFAAW2FE7PJE Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I added it to the end of lib/profile. On June 13, 2015 3:02:56 AM CDT, Ingo Krabbe wrot= e: >I tried it in a fresh window, where it works for me. > >> Thanks for replying! Unfortunately, that doesn't change anything. >Still >> stuck at the 'term% ' prompt. >>=20 >>=20 >> On Sun, Jun 7, 2015 at 6:43 PM, Ingo Krabbe >wrote: >>=20 >>> 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 at >>> > 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 >>=20 >> --=20 >> Ryan >> [ERROR]: Your autotools build scripts are 200 lines longer than your >> program. Something=E2=80=99s wrong. >> http://kirbyfan64.github.io/ --=20 Sent from my Android device with K-9 Mail. Please excuse my brevity. ------438H4MTUXF70PMWFFTQFAAW2FE7PJE Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable I added it to the end of lib/profile.

On June 13, 2015 3:02:56 AM CDT, Ingo Krabbe <= ikrabbe.ask@gmail.com> wrote:
I tried it in a fresh window, where it works for me=
.

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 <ikrabbe.ask@gmail.com> wrote:

try it with

fn cd{<= br /> builtin cd $1
prompt=3D(`{pwd}^'% ' '= ')
}

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



Coming fr= om 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':



fn cd{
builtin cd $1
prompt=3D('= {pwd}^'% ' ' ')
}

cd $HOME



H= owever, 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 t= han your
program. Something=E2=80=99s wrong.
http://kirbyfan64.github.io/




--
Ryan
[ERROR]: Y= our autotools build scripts are 200 lines longer than your
program.= Something=E2=80=99s wrong.
http://kirbyfan64.github.io/




--
Sent from my Android device with K-9 Mail. Please excuse my brevity. ------438H4MTUXF70PMWFFTQFAAW2FE7PJE-- From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <2af7585886a441a7d57f091f95e72501@krabbe.dyndns.org> To: <9fans@9fans.net> Date: Sat, 13 Jun 2015 20:46:21 +0200 From: Ingo Krabbe In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] Trying to override 'cd' command Topicbox-Message-UUID: 584f62c8-ead9-11e9-9d60-3106f5b1d025 try whatis cd to test if the function as active at all btw: I just saw your signature. Great :D >>> --=20 >>> Ryan >>> [ERROR]: Your autotools build scripts are 200 lines longer than your >>> program. Something=E2=80=99s wrong. >>> http://kirbyfan64.github.io/ >=20 > --=20 > Sent from my Android device with K-9 Mail. Please excuse my brevity. From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <2af7585886a441a7d57f091f95e72501@krabbe.dyndns.org> References: <2af7585886a441a7d57f091f95e72501@krabbe.dyndns.org> From: Ryan Gonzalez Date: Fri, 26 Jun 2015 19:24:27 -0500 Message-ID: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=bcaec51ba3ab454879051974e2c0 Subject: Re: [9fans] Trying to override 'cd' command Topicbox-Message-UUID: 5bf46c48-ead9-11e9-9d60-3106f5b1d025 --bcaec51ba3ab454879051974e2c0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Finally booted up Plan 9 again. Indeed, the function works when placed in the shell, but *not in lib/profile*. I'm putting in $HOME/lib/profile. That's the correct location, right? On Sat, Jun 13, 2015 at 1:46 PM, Ingo Krabbe wrote: > try > > whatis cd > > to test if the function as active at all > > btw: I just saw your signature. Great :D > > >>> -- > >>> Ryan > >>> [ERROR]: Your autotools build scripts are 200 lines longer than your > >>> program. Something=E2=80=99s wrong. > >>> http://kirbyfan64.github.io/ > > > > -- > > Sent from my Android device with K-9 Mail. Please excuse my brevity. > > > > --=20 Ryan [ERROR]: Your autotools build scripts are 200 lines longer than your program. Something=E2=80=99s wrong. http://kirbyfan64.github.io/ --bcaec51ba3ab454879051974e2c0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Finally booted up Plan 9 again. Indeed, the function works= when placed in the shell, but *not in lib/profile*.

I&#= 39;m putting in $HOME/lib/profile. That's the correct location, right?<= br>


On Sat, Jun 13, 2015 at 1:46 PM, Ingo Krabbe <ikrabbe.ask= @gmail.com> wrote:
try

whatis cd

to test if the function as active at all

btw: I just saw your signature. Great :D

>>> --
>>> Ryan
>>> [ERROR]: Your autotools build scripts are 200 lines longer tha= n your
>>> program. Something=E2=80=99s wrong.
>>> http://kirbyfan64.github.io/
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.





--
=
Ryan
[ERROR]: Your autot= ools build scripts are 200 lines longer than your program. Something=E2=80= =99s wrong.
--bcaec51ba3ab454879051974e2c0-- From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: <2af7585886a441a7d57f091f95e72501@krabbe.dyndns.org> Date: Sat, 27 Jun 2015 15:34:24 +0200 Message-ID: From: Neven Sajko To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Subject: Re: [9fans] Trying to override 'cd' command Topicbox-Message-UUID: 5c1ca5fa-ead9-11e9-9d60-3106f5b1d025 >>From the manual: -l If -l is given or the first character of argument zero is -, rc reads commands from $home/lib/profile, if it exists, before reading its normal input. Does this help you? From mboxrd@z Thu Jan 1 00:00:00 1970 User-Agent: K-9 Mail for Android In-Reply-To: References: <2af7585886a441a7d57f091f95e72501@krabbe.dyndns.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----QEHV2JFUR6B6T9NR7E1GY6NKEER13V" From: Ryan Gonzalez Date: Sat, 27 Jun 2015 11:55:32 -0500 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>, Neven Sajko Message-ID: <0DEA53A5-7447-4DB5-9974-EEAB957E488D@gmail.com> Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Trying to override 'cd' command Topicbox-Message-UUID: 5c323a0a-ead9-11e9-9d60-3106f5b1d025 ------QEHV2JFUR6B6T9NR7E1GY6NKEER13V Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I think so... So, in order to get my cd command, I enter '-' at the rc prompt? Is there= some way for that to happen automatically? On June 27, 2015 8:34:24 AM CDT, Neven Sajko wrote: >>>From the manual: > > -l If -l is given or the first character of argument > zero is -, rc reads commands from > $home/lib/profile, if it exists, before reading > its normal input. > >Does this help you? --=20 Sent from my Android device with K-9 Mail. Please excuse my brevity. ------QEHV2JFUR6B6T9NR7E1GY6NKEER13V Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable I think so...

So, in order to get my cd command, I enter '-' at the rc prompt? = Is there some way for that to happen automatically?

On June 27, 2015 8:34:24 AM CDT, Neven Sajko <nsajko@gmai= l.com> wrote:
From the manual:

-l If= -l is given or the first character of argument
= zero is -, rc reads commands from
$home/lib/pr= ofile, if it exists, before reading
its normal = input.

Does this help you?


--
Sent from my Android device with K-9 Mail. Please excuse my brevity. ------QEHV2JFUR6B6T9NR7E1GY6NKEER13V-- From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sat, 27 Jun 2015 22:23:32 +0200 From: Teodoro Santoni To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-ID: <20150627202332.GA5343@edge> References: <2af7585886a441a7d57f091f95e72501@krabbe.dyndns.org> <0DEA53A5-7447-4DB5-9974-EEAB957E488D@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0DEA53A5-7447-4DB5-9974-EEAB957E488D@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [9fans] Trying to override 'cd' command Topicbox-Message-UUID: 5c3bbddc-ead9-11e9-9d60-3106f5b1d025 On Sat, Jun 27, 2015 at 11:55:32AM -0500, Ryan Gonzalez wrote: > I think so... > > So, in order to get my cd command, I enter '-' at the rc prompt? Is there some way for that to happen automatically? > > On June 27, 2015 8:34:24 AM CDT, Neven Sajko wrote: > >From the manual: > > > > -l If -l is given or the first character of argument > > zero is -, rc reads commands from > > $home/lib/profile, if it exists, before reading > > its normal input. > > > >Does this help you? Good evening, no. You have to source the file $home/lib/profile by hand or invoke rc from a link called -rc, as rc -l or whatever. -- Teodoro Santoni Something is wrong. I don't wanna compile 20 KB of Go code to list files.