|
Hi David, the reason for this behavior is that copying (possibly huge) apl scripts into the history is somewhat annoying because that information is already contained in the scripts themselves. The decision if the input is interactive or not is based on the return value of C function tcgetattr. If that function returns no error then an interactive session is assumed (and the history is written at the end of the session). Please note that this decision only affects the writing of the history file at the end of a session (so that the history will survive and be available in the next session) but not the history itself. That means that )HISTORY or ⍎")HISTORY" should work even if the session is fed by a pipe. /// Jürgen On 07/20/2016 05:34 PM, David B.
Lamkins wrote:
Thanks, Jürgen. I see what's happening now: The history file is not enabled when input is from a pipe, which is the case when I run akt|apl. The history file works as expected when input is from a terminal.I guess I should finally get around to rewriting akt to use forkpty(). :) On Wed, Jul 20, 2016 at 12:40:41PM +0200, Juergen Sauermann wrote: |
- [Bug-apl] .apl.history file? David B. Lamkins
- Re: [Bug-apl] .apl.history file? Juergen Sauermann
- Re: [Bug-apl] .apl.history file? David B. Lamkins
- Re: [Bug-apl] .apl.history file? Juergen Sauermann
