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--