Skip to content

Commit

Permalink
edit (ble-detach): prepend a space to "stty sane" for "HISTIGNORE=' *'"
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Mar 4, 2022
1 parent 344168e commit 26b532e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions docs/ChangeLog.md
Expand Up @@ -154,6 +154,7 @@
- edit (command-help): show source files for functions `#D1779` 7683ab9
- edit (`ble/builtin/exit`): defer exit in trap handlers (motivated by SuperSandro2000) `#D1782` f62fc04 6fdabf3
- complete (`source:command/get-desc`): show function location and body `#D1788` 0000000
- edit (`ble-detach`): prepend a space to `stty sane` for `HISTIGNORE=' *'` `#D1796` 0000000

## Fixes

Expand Down
19 changes: 11 additions & 8 deletions note.txt
Expand Up @@ -1959,14 +1959,6 @@ bash_tips
ついてはやはり曖昧一致であって欲しい。という事を考えると曖昧一致で塊とす
るとしてもその対象は変数展開だけに限られてくるのではないか。

* もしかしたら stty sane の頭に空白を置くと良いのでは。先頭に空白を置いたコマ
ンドの履歴登録をなしにする設定にしている人がいる。

或いは勝手に stty sane を HISTIGNORE に設定するという手もある? と思ったが、
それだとユーザーが本当に自分で stty sane を実行した時に履歴に残らないし、或
いは HISTIGNORE を一旦保存して復元する仕組みを作ったとしても何かの拍子に実
行できなかった時にやはり困るし、余り信頼性が高いとは言えない。

2022-01-23

* コマンドのログ機能を作成する。
Expand Down Expand Up @@ -6143,6 +6135,17 @@ bash_tips

2022-03-02

* 2022-02-03 edit: もしかしたら stty sane の頭に空白を置くと良いのでは [#D1796]

先頭に空白を置いたコマンドの履歴登録をなしにする設定にしている人がいる。

或いは勝手に stty sane を HISTIGNORE に設定するという手もある? と思ったが、
それだとユーザーが本当に自分で stty sane を実行した時に履歴に残らないし、或
いは HISTIGNORE を一旦保存して復元する仕組みを作ったとしても何かの拍子に実
行できなかった時にやはり困るし、余り信頼性が高いとは言えない。

これた簡単だが採用する。

* history: detach 状態で終了すると履歴に記録されない [#D1795]

detach 状態で終了した時、また detach している間の履歴が記録されなくなってい
Expand Down
2 changes: 1 addition & 1 deletion src/edit.sh
Expand Up @@ -9710,7 +9710,7 @@ function ble-edit/bind/.check-detach {
"Please run \`stty sane' to recover the correct TTY state."

if ((_ble_bash>=40000)); then
READLINE_LINE='stty sane;' READLINE_POINT=10 READLINE_MARK=0
READLINE_LINE=' stty sane;' READLINE_POINT=11 READLINE_MARK=0
printf %s "$READLINE_LINE"
fi
fi
Expand Down

0 comments on commit 26b532e

Please sign in to comment.