Skip to content

Commit

Permalink
contrib/integration/fzf-menu: fix index extraction
Browse files Browse the repository at this point in the history
* README: fix appearance of the markers of disclaimer items
* core-complete: remove a stray comment
  • Loading branch information
akinomyoga committed Aug 23, 2024
1 parent d6a38c4 commit 5b9d9ab
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 27 deletions.
6 changes: 3 additions & 3 deletions README-ja_JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,12 @@ Vimモードの実装は2017年9月に始まり2018年3月に一先ず完成と

## 免責事項

- Q. ble.sh の読み方が分からない<a id="discl-pronun" href="#discl-pronun">†1</a>---
- <sup><a id="discl-pronun" href="#discl-pronun">†1</a></sup>Q. "ble.sh の読み方が分からない"---
A. `ble.sh` はお好きな様に読んでいただいて問題ありませんが、一番短いのは標記の /blɛʃ/ になりましょう。
しかし個人的には脳裡で /biːɛliː/ または /biːɛliː dɑt ɛseɪtʃ/ と読んでいるものですから、
標記の読み方は飽くまで参考と受け止めていただければ幸いです。
- Q. コマンドを実行するのだからピュアBashのはずがない<a id="discl-pure" href="#discl-pure">†2</a>。
ピュアBashとは何たることか---
- <sup><a id="discl-pure" href="#discl-pure">†2</a></sup>Q. "コマンドを実行するのだからピュアBashのはずがない
ピュアBashとは何たることか"---
A. ラインエディタ本体がピュア Bashで書かれているという意味です。
勿論、ユーザーが外部コマンドを入力・実行した場合にはその外部コマンドが呼び出されます。
更に、ユーザーコマンド実行前後には TTY を適切に設定する為に `stty` (POSIX) が呼び出されます。
Expand Down
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,29 +245,29 @@ For example,

## Disclaimer

- Q. It is hard to pronounce "ble-sh"<a id="discl-pronun"
href="#discl-pronun">†1</a>. How should I pronounce it? --- A. The easiest
- <sup><a id="discl-pronun" href="#discl-pronun">†1</a></sup>Q. *It is hard to
pronounce "ble-sh". How should I pronounce it?* --- A. The easiest
pronunciation of `ble.sh` that users use is /blɛʃ/, but you can pronounce it
as you like. I do not specify the canonical way of pronouncing `ble.sh`. In
fact, I personally call it simply /biːɛliː/ or verbosely read it as /biːɛliː
dɑt ɛseɪtʃ/ in my head.
- Q. It cannot be pure Bash<a id="discl-pure" href="#discl-pure">†2</a>
because the user should be able input and run external commands. What does
the pure Bash mean? --- A. It means that the core part of the line editor is
written in pure Bash. Of course, the external commands will be run when the
user input it and request the execution of it. In addition, before and after
the execution of user commands, `ble.sh` relies on POSIX `stty` to set up the
correct TTY states for user commands. It also uses other POSIX utilities for
acceleration in some parts of initialization and cleanup code, processing of
large data in completions, pasting large data, etc. The primary goal of the
`ble.sh` implementation is not being pure Bash, but the performance in the
Bash implementation with the POSIX environment. Being pure Bash is usually
useful for reducing the `fork`/`exec` cost, but if implementation by external
commands are more efficient in specific parts, `ble.sh` will use the external
commands there.
- Q. Why does `ble.sh` use `make` to generate the script file?<a
id="discl-make" href="#discl-make">†3</a> You should not use `make` for a
script framework. --- A. Because it is not a good idea to directly edit a
- <sup><a id="discl-pure" href="#discl-pure">†2</a></sup>Q. *It cannot be pure
Bash because the user should be able input and run external commands. What
does the pure Bash mean?* --- A. It means that the core part of the line
editor is written in pure Bash. Of course, the external commands will be run
when the user input it and request the execution of it. In addition, before
and after the execution of user commands, `ble.sh` relies on POSIX `stty` to
set up the correct TTY states for user commands. It also uses other POSIX
utilities for acceleration in some parts of initialization and cleanup code,
processing of large data in completions, pasting large data, etc. The
primary goal of the `ble.sh` implementation is not being pure Bash, but the
performance in the Bash implementation with the POSIX environment. Being
pure Bash is usually useful for reducing the `fork`/`exec` cost, but if
implementation by external commands are more efficient in specific parts,
`ble.sh` will use the external commands there.
- <sup><a id="discl-make" href="#discl-make">†3</a></sup>Q. *Why does `ble.sh`
use `make` to generate the script file? You should not use `make` for a
script framework.* --- A. Because it is not a good idea to directly edit a
large script file of tens of thousands of lines. I split the codebase of
`ble.sh` into source files of reasonable sizes and edit the source files. In
the build process, some source files are combined to form the main script
Expand Down
2 changes: 1 addition & 1 deletion contrib
4 changes: 2 additions & 2 deletions docs/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
- decode (`ble-bind`): support combined option arguments of the forms `--long=OPTARG` and `-kOPTARG` `#D2211` 1b16d399
- canvas: use `_ble_term_invis` to hide characters used to determine char-width modes (requested by tessus) `#D2223` 8bb302e0
- canvas: hide cursor during char-width detection (requested by tessus) `#D2232` 0ff29b26
- exec: refine the elapsed time resolution `#D2249` 67548656 xxxxxxxx
- exec: refine the elapsed time resolution `#D2249` 67548656 713c4215

## Fixes

Expand Down Expand Up @@ -197,7 +197,7 @@
- contrib/bash-preexec: support `__bp_set_ret_value` (requested by Comnenus) `#D2238` b154058a
- contrib/colorglass: fix fixed-point round `#D2239` b154058a
- contrib: add `config/github48{1,3}` for elapsed-mark examples `#D2249` 67548656
- contrib: add `integration/fzf-menu` (motivated by pallaswept) `#D2251` ad6f58b7
- contrib: add `integration/fzf-menu` (motivated by pallaswept) `#D2251` ad6f58b7 xxxxxxxx
- contrib/integration/fzf-completion: add `ble/widget/fzf-complete` (motivated by 3ximus) `#D2252` ad6f58b7

## Documentation
Expand Down
2 changes: 0 additions & 2 deletions lib/core-complete.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3790,8 +3790,6 @@ function ble/complete/progcomp/.parse-complete {
## Select only the completions starting with "$COMPV". If nothing is
## selected, use the original set of completions.
##
## sed /^$rex_compv/ でフィルタする。
## それで候補が一つもなくなる場合にはフィルタ無しで単語を列挙する。
function ble/complete/progcomp/.filter-and-split-compgen {
flag_mandb=

Expand Down
12 changes: 12 additions & 0 deletions note.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7373,6 +7373,13 @@ bash_tips

2024-08-23

* contrib: fzf-menu 修正 (reported by pallaswept) [#D2259]
https://github.com/akinomyoga/ble.sh/issues/479#issuecomment-2305871596
Ref: #D2251

実は動かなくなっていた。起動だけ確認して C-c でキャンセルしていたので気づか
なかった。他にも追加の微調整をする。

* color: 配色再調整 - 背景色・前景色を両方指定している場合も駄目の様だ [#D2258]
https://github.com/akinomyoga/ble.sh/issues/478#issuecomment-2304712451
Ref: #D2248
Expand Down Expand Up @@ -7768,6 +7775,8 @@ bash_tips

処理をするのだと考えると sort を実行するのが良い気がする。

2024-08-23 古いコードコメントの断片が残っていた。修正する。

2024-08-21

* contrib: ble/widget/fzf-complete (motivated by 3ximus) [#D2252]
Expand Down Expand Up @@ -7810,6 +7819,9 @@ bash_tips

2024-08-22 註の marker が小さくなっていない。小さくする。

2024-08-23 註本体の方の marker の大きさがそのままだった。修正する。また項目
の先頭に来る様に位置を変更する。

* contrib: exec_elapsed_mark 設定 (motivated by paulzzy, TheFantasticWarrior) [#D2249]

* exec_elapsed_mark からコマンド名を削除する方法
Expand Down

0 comments on commit 5b9d9ab

Please sign in to comment.