[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: History -r breaks on FIFOs

From: Chet Ramey
Subject: Re: History -r breaks on FIFOs
Date: Thu, 21 Jan 2021 14:43:55 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.1

On 1/21/21 11:18 AM, Merijn Verstraaten wrote:
The history command doesn't seem to work when given a FIFO instead of a file. I was trying to load 
history from FIFO using either 'history -r <(echo "$hist")' or 'echo "$hist" | 
history -r /dev/stdin', but neither of these seem to work, due to the command being unable to handle 

Correct. The history file reading code requires the history file be a
regular file. This is because the technique it uses to read and process
the file (mmap or read the file in one read into a large buffer, then
move around in the buffer) doesn't work with non-regular files.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]