delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/03/01/10:01:18

X-Spam-Check-By: sourceware.org
Message-ID: <45E6EAA0.5090603@hima.com>
Date: Thu, 01 Mar 2007 16:00:48 +0100
From: Sven Severus <s DOT severus AT hima DOT com>
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Bash-Scripting: any way to pre-initialize readline's edit buffer with a user-defined string?
X-Spam-Processed: mail.hima.com, Thu, 01 Mar 2007 16:00:51 +0100 (not processed: message from valid local sender)
X-MDRemoteIP: 192.168.100.10
X-Return-Path: s DOT severus AT hima DOT com
X-Envelope-From: s DOT severus AT hima DOT com
X-MDaemon-Deliver-To: cygwin AT cygwin DOT com
X-MDAV-Processed: mail.hima.com, Thu, 01 Mar 2007 16:00:51 +0100
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Hello,

a simple (i hope ;->) question for bash scripting experts:

I want to write a script, that interactivly prompts the user
for a couple of input items. So my bash code looks like
this:      read -er -p"ItemX: " ITEMX
Most of the items have default values, and I would find it
very user-friendly, if readline's edit buffer would be pre-
initialized with this default value, instead of an empty string.
Then the user just has to hit <return> to enter the default
value, very comfortable.

Any idea how to achieve this?
Thanks.

Best regards
Sven

-- 

Mit freundlichen Grüßen

Dipl. Inform. Sven Severus
Softwareentwicklung
----------------------------------------------------------
HIMA Paul Hildebrandt GmbH + CO KG
Abt: Entwicklung Software
Albert-Bassermann-Strasse 28
68782 Bruehl
Germany

Tel: +49 6202 709-289
Fax: +49 6202 709-299
E-Mail: s DOT severus AT hima DOT com
Internet: www.hima.de


--

HIMA Paul Hildebrandt GmbH + Co KG, Postfach 12 61, 68777 Bruehl bei Mannheim
Kommanditgesellschaft, Sitz Bruehl, Deutschland - Registergericht Mannheim HRA 421017
Ust-ID: DE 144286400, St.Nr: 43038 00190

Persoenlich haftende Gesellschafterin Paul Hildebrandt Verwaltungsgesellschaft mbH, 
Sitz Bruehl, Deutschland - Registergericht Mannheim HRB 420588

Geschaeftsfuehrer: Dipl.-Betriebswirt Steffen Philipp, Dipl.-Kfm. Peter Swiczinsky




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019