[NTLUG:Discuss] Auto-completion within a bash script?

Lance Simmons simmons.lance at gmail.com
Thu Apr 16 14:10:02 CDT 2009


On Thu, Apr 16, 2009 at 12:23 PM, Eric Waguespack <ewaguespack at gmail.com> wrote:
>
> I am not aware of any way to allow auto completion in a bash script,
> (at the read prompt).
[...]
> change
> read ATTACHMENT
> to
> ATTACHMENT="$1"
> then you would have your auto completion, though it would be at script
> initiation, not during execution.

That was how I did it in the past, but the problem was that I kept
forgetting in what order to place the four arguments (file with list
of addresses, file with message, subject heading, and, if
appropriate, attachment file).  The two important ones are the
message file and the attachment file, so maybe I should use two
(auto-completed) arguments and then two read prompts for the
list of addresses and the subject line.
-- 
Lance Simmons



More information about the Discuss mailing list