[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Readline history and bash's read -e
From: |
Chris F.A. Johnson |
Subject: |
Re: Readline history and bash's read -e |
Date: |
Sun, 2 Sep 2007 18:31:43 -0400 |
User-agent: |
slrn/0.9.8.1 (Linux) |
On 2007-08-31, Phil Endecott wrote:
> Dear Bash and Readline Experts,
>
> I have a simple shell script that reads user commands in a loop using
> "read -e". -e enables readline, but not its history feature. Is there
> any way to get readline history with bash's read builtin?
>
> I wouldn't want to get the user's regular bash history; rather, this
> program would need its own history file in the user's home directory.
> For example:
>
> read -e --historyfile=~/.myprogname_history CMD
history -r ~/.myprogname_history
read -ep ">> " CMD
--
Chris F.A. Johnson <http://cfaj.freeshell.org>
===================================================================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
.