Author Topic: prompt improvement  (Read 1809 times)

Offline z993126

  • BFF
  • ***
  • Posts: 128
    • View Profile
prompt improvement
« on: March 04, 2012, 02:20:32 PM »
Had been wanting a few days ago the ability to separate all commands with a horizontal bar, to make it clearer when debugging.
To /lib/nmsh.c, in GetPrompt(), prior to if(grepp(ret,"$g")), I added the following:
Code: [Select]
ret = replace_string(ret,"$!","\n");
ret = replace_string(ret,"$-",repeat_string("-",this_object()->GetScreen()[0]));

"prompt $!$!$-$!>" gives you a nice horizontal line under which is your new prompt.

public domain, free to add, modify, whatever.  probably a more efficient way to do the bar, too.
« Last Edit: March 04, 2012, 02:27:03 PM by z993126 »