|
From: | Chet Ramey |
Subject: | Re: Feature request for PS0 |
Date: | Mon, 7 Feb 2022 21:44:20 -0500 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 |
On 2/7/22 6:58 PM, Koichi Murase wrote:
2022年2月8日(火) 4:14 Akbarkhon Variskhanov <akbarkhon.variskhanov@gmail.com>:of it, so that the whole command line looks like this after having been read: ~ echo "Hello, Wo # not finished typing ~ echo "Hello, World!" # finished typing, pressing Enter 21:39:44 ~ echo "Hello, World!" Hello, World!Maybe this is just another hack that has some corner cases, but how about this? bind -x '"\xC0\a":printf "%(%T)T "' bind '"\xC0\r":accept-line' bind '"\r":"\xC0\a\xC0\r"'
This is a valuable and powerful idiom. You can also take advantage of the fact that \r and \n are both bound to accept-line. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
[Prev in Thread] | Current Thread | [Next in Thread] |