9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Ingo Krabbe <ikrabbe.ask@gmail.com>
To: <9fans@9fans.net>
Subject: Re: [9fans] Trying to override 'cd' command
Date: Sat, 13 Jun 2015 10:02:56 +0200	[thread overview]
Message-ID: <be61bc110102774f42f184c5ea612352@krabbe.dyndns.org> (raw)
In-Reply-To: <CAO41-mPDBZh6WThoem2Ax_c7kxX5HYbkV0nr6ZJaCDEr6+ahZw@mail.gmail.com>

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{
>>             builtin cd $1
>>             prompt=(`{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=('{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’s wrong.
>> > http://kirbyfan64.github.io/
>>
>>
>>
> 
> 
> -- 
> Ryan
> [ERROR]: Your autotools build scripts are 200 lines longer than your
> program. Something’s wrong.
> http://kirbyfan64.github.io/





  parent reply	other threads:[~2015-06-13  8:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-07 23:29 Ryan Gonzalez
2015-06-07 23:43 ` Ingo Krabbe
2015-06-12 21:05   ` Ryan Gonzalez
2015-06-12 21:35     ` Bakul Shah
2015-06-12 21:50     ` Anthony Sorace
2015-06-13  8:02     ` Ingo Krabbe [this message]
2015-06-13 17:22       ` Ryan Gonzalez
2015-06-13 18:46         ` Ingo Krabbe
2015-06-27  0:24           ` Ryan Gonzalez
2015-06-27 13:34             ` Neven Sajko
2015-06-27 16:55               ` Ryan Gonzalez
2015-06-27 20:23                 ` Teodoro Santoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=be61bc110102774f42f184c5ea612352@krabbe.dyndns.org \
    --to=ikrabbe.ask@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).