Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16015
| Path | csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail |
|---|---|
| From | 積丹尼 Dan Jacobson <jidanni@jidanni.org> |
| Newsgroups | gnu.bash.bug |
| Subject | Add non-interactive PROMPT_COMMAND |
| Date | Tue, 10 Mar 2020 22:50:50 +0800 |
| Lines | 17 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.2447.1583898072.2412.bug-bash@gnu.org> (permalink) |
| References | <87wo7sgt6d.8.fsf@jidanni.org> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain |
| X-Trace | usenet.stanford.edu 1583898073 9919 209.51.188.17 (11 Mar 2020 03:41:13 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| To | bug-bash@gnu.org |
| Envelope-to | bug-bash@gnu.org |
| X-Sender-Id | dreamhost|x-authsender|jidanni@jidanni.org |
| X-Sender-Id | dreamhost|x-authsender|jidanni@jidanni.org |
| X-MC-Relay | Neutral |
| X-MailChannels-SenderId | dreamhost|x-authsender|jidanni@jidanni.org |
| X-MailChannels-Auth-Id | dreamhost |
| X-Vacuous-Bored | 56452dfb70a6a825_1583898066372_425162814 |
| X-MC-Loop-Signature | 1583898066372:506184060 |
| X-MC-Ingress-Time | 1583898066372 |
| DKIM-Signature | v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to :subject:date:message-id:mime-version:content-type; s= jidanni.org; bh=eV4hpeYPT9BzUhCLr+XRdv36TxU=; b=Kg4iWIfyOBz5EIXQ M1DuXnhdtkbaFx3eI5orHhTS7Ct3RSRSGNpQYDMMhgq4aZ1B0CyTdsZ4Nh4e/uYQ +ZqAtlAcIKIJ1syqj1r3QtggyZOabZ1UXTmca10TW5DgDzR15+ZLkqk1oIbVOWVS m3fI8NvUJd6V7MA6SsKa5D4k7vw= |
| X-DH-BACKEND | pdx1-sub0-mail-a52 |
| X-VR-OUT-STATUS | OK |
| X-VR-OUT-SCORE | 0 |
| X-VR-OUT-SPAMCAUSE | gggruggvucftvghtrhhoucdtuddrgedugedruddvuddgiedvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkgggtsehttdertddttdejnecuhfhrohhmpejnnjjnucffrghnucflrggtohgsshhonhcuoehjihgurghnnhhisehjihgurghnnhhirdhorhhgqeenucfkphepuddrudejtddrkeehrddugeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepjhhiuggrnhhnihdrohhrghdpihhnvghtpedurddujedtrdekhedrudegiedprhgvthhurhhnqdhprghthheppeeruhhtfhdqkeerueerheeimhfphefnihehhegsveekreepucffrghnucflrggtohgsshhonhcuoehjihgurghnnhhisehjihgurghnnhhirdhorhhgqedpmhgrihhlfhhrohhmpehjihgurghnnhhisehjihgurghnnhhirdhorhhgpdhnrhgtphhtthhopegsuhhgqdgsrghshhesghhnuhdrohhrgh |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] |
| X-Received-From | 23.83.209.48 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.23 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <https://lists.gnu.org/archive/html/bug-bash> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <87wo7sgt6d.8.fsf@jidanni.org> |
| Xref | csiph.com gnu.bash.bug:16015 |
Show key headers only | View raw
PROMPT_COMMAND=sleep\ 1 is great, it lets us slow down scripts... but alas only if they are interactive. One might say: "Sure, instead of $ bash script just use $ sed 's/^/sleep 1; /' script | bash" But that assumes one command per line, and could easily mangle things. Instead bash simply needs a PROMPT_COMMAND that works non-interactively too. Anyway, we could use it to e.g., "check how much oil we have left before executing each command" etc. tons of great uses! Maybe even have fullblown PRE and POST commands, that fire before and after each command.
Back to gnu.bash.bug | Previous | Next | Find similar
Add non-interactive PROMPT_COMMAND 積丹尼 Dan Jacobson <jidanni@jidanni.org> - 2020-03-10 22:50 +0800
csiph-web