[MacPorts] #56381: It would be nice if shell mode saved command history immediately

MacPorts noreply at macports.org
Tue May 22 00:59:54 UTC 2018


#56381: It would be nice if shell mode saved command history immediately
----------------------------+--------------------
  Reporter:  ylluminarious  |      Owner:  (none)
      Type:  enhancement    |     Status:  new
  Priority:  Normal         |  Milestone:
 Component:  base           |    Version:  2.4.3
Resolution:                 |   Keywords:
      Port:                 |
----------------------------+--------------------

Comment (by ylluminarious):

 Hi again folks,

 I've been working on this today and I've run into a bit of a wall. I think
 I've successfully wrapped the {{{append_history}}} function and I've also
 got some code which uses it in {{{port.tcl}}}. Yet, for some reason the
 {{{use_readline}}} variable is always false when I run a custom build of
 {{{port}}}. I'm using this custom build as per the
 [https://guide.macports.org/chunked/installing.macports.html#installing.macports.source.multiple
 instructions in the guide about running multiple installations of
 Macports.]

 It seems that {{{use_readline}}} is false because of the second clause in
 its definition:

 {{{set use_readline [expr {$isstdin && [readline init "port"]}]}}}.

 That is, the {{{[readline init "port"]}}} command seems to be failing for
 some reason. I have no idea why that would be even after examining its
 definition [https://github.com/macports/macports-
 base/blob/v2.4.4/src/pextlib1.0/readline.c#L173-L197 here.] Moreover, my
 code does not touch anything in the {{{ReadlineCmd}}} function.

 I've attached a patch which contains my code. I currently have some
 debugging {{{puts}}} statements in it because of the above-mentioned bug.
 So that's why they're there, if you're wondering.

 Some environment information:

 * I'm on macOS 10.13.4
 * The custom Macports build is on commit {{{a6aa79a2}}} (which is v2.4.4)
 * I've got a real Macports installation under {{{/opt/local}}}
 * The custom Macports build has no ports installed and I've not run
 {{{selfupdate}}} on it

 I would appreciate any help that could be offered.

-- 
Ticket URL: <https://trac.macports.org/ticket/56381#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list