Re: [9fans] Trying to override 'cd' command

2015-06-12 Thread Anthony Sorace
It works:

: root; fn cd {builtin cd $* ; prompt=(': '`{pwd}^'; ' '')}
: root; cd
: /usr/a; cd /tmp
: /tmp; 

If you’re still having trouble, paste a transcript like that, so we can see 
what’s going on.

Note also that spaces in file names will screw up the easy version of this. If 
you’re on a filesystem that likes such things, you might instead want something 
like this:

: /Library/Desktop; pwd
/Library/Desktop Pictures
: /Library/Desktop; fn cd {builtin cd $* ; cwd=`{pwd} ; prompt=(': 
'$cwd^'; ' '')}
: /Library/Desktop; cd .
: /Library/Desktop Pictures; 



 On Jun 12, 2015, at 17:05 , Ryan Gonzalez rym...@gmail.com wrote:
 
 Thanks for replying! Unfortunately, that doesn't change anything. Still stuck 
 at the 'term% ' prompt.
 




Re: [9fans] Trying to override 'cd' command

2015-06-12 Thread Ryan Gonzalez
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@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/


Re: [9fans] Trying to override 'cd' command

2015-06-12 Thread Bakul Shah
On Fri, 12 Jun 2015 16:05:21 CDT Ryan Gonzalez rym...@gmail.com 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).