hanslub42 / rlwrap

A readline wrapper
GNU General Public License v2.0
2.53k stars 149 forks source link

-f . should fail silently if there is no history (yet) #177

Closed hanslub42 closed 1 year ago

hanslub42 commented 1 year ago

rlwrap -f . <command> uses <command>'s history (usually in $RLWRAP_HOME/command_history) as a source for its completion word list.

When running <command> for the first time, this makes rlwrap fail with the message rlwrap: error: Could not open [..]command_history: No such file or directory

This is a very minor problem (a simple touch command will solve it) but it would be more POLA-compliant if rlwrap would just ignore the missing history file

hanslub42 commented 1 year ago

This could be extended to:

Current rlwrap behaviour:

-f <non_existing file>: fail with error -f . when there is no history file: fail with error

Proposed behaviour: -f <non_existing file>: warning -f . when there is no history file: ignore

hanslub42 commented 1 year ago

fixed by b0b72162c6791c1bcf27beab9a8da26b696435dc. Closing