From 24a88cefa7f6fec65f1dd61329aadb356e01b306 Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Tue, 11 May 2021 01:01:12 +0900 Subject: [PATCH] promopt: let "stderr" pass through to tty in evaluating "PS0" --- memo/ChangeLog.md | 5 +++-- note.txt | 8 ++++++++ src/edit.sh | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/memo/ChangeLog.md b/memo/ChangeLog.md index 77a6f28b..5318a153 100644 --- a/memo/ChangeLog.md +++ b/memo/ChangeLog.md @@ -27,8 +27,8 @@ - syntax: support tilde expansions in parameter expansions `#D1513` 0506df2 - decode: support `ble-bind -m KEYMAP --cursor DECSCUSR` (motivated by jmederosalvarado) `#D1514` `#D1515` `#D1516` 79d671d - edit: support `nsearch` options (motivated by Alyetama, rashil2000, carv-silva) `#D1517` 9125795 -- syntax: support the deprecated redirection `>& file` `#D1539` 0000000 -- complete: complete file descriptors and heredoc words after redirections `#D1539` 0000000 +- syntax: support the deprecated redirection `>& file` `#D1539` b9b0de4 +- complete: complete file descriptors and heredoc words after redirections `#D1539` b9b0de4 ## Changes @@ -58,6 +58,7 @@ - util (`ble/util/type`): fix a bug that aliases are not properly highlighted (reported by 3ximus) `#D1526` 45b30a7 - syntax (`ble/syntax:bash/simple-word/eval`): optimize large array passing (motivated by timjrd) `#D1522` c89aa23 - main: accept non-regular files as `blerc` and add option `--norc` `#D1530` 7244e2f +- promopt: let `stderr` pass through to tty in evaluating `PS0` (reported by tycho-kirchner) `#D1531` 0000000 ## Fixes diff --git a/note.txt b/note.txt index 12e6e60c..882e9ad0 100644 --- a/note.txt +++ b/note.txt @@ -4405,6 +4405,14 @@ bash_tips 2021-05-10 + * syntax: PS0 から stderr に出力できないという報告を受けた (reported by tycho-kirchner) [#D1541] + https://github.com/akinomyoga/ble.sh/issues/107 + + 一体何をしたいのか謎だがまあ元の bash で動く以上はその動作を利用する設定も + あるだろう。元々その様に実装していたのは set -x の出力を防ぐ為だったが、よ + く見たら PS0 の出力は restore-bash-options の前だったのでこの段階では 2 を + 端末に出力しても OK. + * 2021-03-21 gitstatus.plugin.sh の alias builtin で builtin eval 他が破壊されている [#D1540] https://github.com/akinomyoga/ble.sh/issues/93 https://github.com/romkatv/gitstatus/pull/235 diff --git a/src/edit.sh b/src/edit.sh index 056ee0e8..6386f3d4 100644 --- a/src/edit.sh +++ b/src/edit.sh @@ -4998,7 +4998,7 @@ function ble-edit/exec:gexec/.prologue { _ble_edit_exec_INT=0 ble/util/joblist.clear ble-edit/exec:gexec/invoke-hook-with-setexit PREEXEC "$_ble_edit_exec_BASH_COMMAND" &>/dev/tty - ble-edit/exec/print-PS0 >&31 + ble-edit/exec/print-PS0 >&31 2>&32 ble-edit/exec/restore-BASH_REMATCH ble/base/restore-bash-options ble/base/restore-POSIXLY_CORRECT