Skip to content

Commit

Permalink
blerc: add missing faces "argument_option" and "cmdinfo_cd_cdpath"
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Oct 4, 2021
1 parent fdfe62a commit 26aaf87
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 5 deletions.
2 changes: 2 additions & 0 deletions blerc
Expand Up @@ -637,6 +637,7 @@
#ble-face -s command_keyword fg=blue
#ble-face -s command_jobs fg=red,bold
#ble-face -s command_directory fg=navy,underline
#ble-face -s argument_option fg=teal
#ble-face -s filename_directory underline,fg=26
#ble-face -s filename_directory_sticky underline,fg=white,bg=26
#ble-face -s filename_link underline,fg=teal
Expand All @@ -662,6 +663,7 @@
#ble-face -s varname_transform fg=29,bold
#ble-face -s varname_unset fg=124

#ble-face -s cmdinfo_cd_cdpath fg=26,bg=155

##-----------------------------------------------------------------------------
## Keybindings
Expand Down
8 changes: 6 additions & 2 deletions docs/ChangeLog.md
Expand Up @@ -74,7 +74,7 @@
- edit: support bash-5.2 `READLINE_ARGUMENT` `#D1638` d347fb3
- complete: support `complete [-DI]` in old versions of Bash through `_DefaultCmD_` and `_InitialWorD_` `#D1639` 925b2cd
- rlfunc: support nsearch widgets in `vi_nmap` keymap (requested by cornfeedhobo) `#D1651` 9a7c8b1
- prompt: support `bleopt prompt_ruler` `#D1666` 05cf638
- prompt: support `bleopt prompt_ruler` (motivated by Barbarossa93) `#D1666` 05cf638
- prompt: fix hanging by a zero-width `prompt_ruler` `#D1673` 0000000

## Changes
Expand Down Expand Up @@ -112,7 +112,6 @@
- prompt: do not evaluate `PROMPT_COMMAND` for subprompts `#D1654` 08e903e
- Makefile: work around the case the repository is cloned without `--recursive` `#D1655` 22ace5f
- repo: add subdirectories `make` and `docs` `#D1657` 75bd04c
- blerc: add all the missing options `#D1667` 0228d76
- util: time out <kbd>CPR</kbd> requests `#D1669` 1481d48

## Fixes
Expand Down Expand Up @@ -180,6 +179,11 @@
- decode (`cmap/initialize`): fix unquoted special chars in the cmap cache `#D1647` 7434d2d
- decode: fix a bug that the characters input while initialization are delayed `#D1670` 430f449

## Documentation

- blerc: add all the missing options `#D1667` 0228d76
- blerc: add missing faces `argument_option` and `cmdinfo_cd_cdpath` (reported by Prikalel) `#D1675` 0000000

## Optimization

- syntax (`layer:syntax/word`): perform pathname expansions in background subshells (motivated by 3ximus) `#D1449` 13e7bdd
Expand Down
4 changes: 2 additions & 2 deletions lib/core-complete-def.sh
Expand Up @@ -96,5 +96,5 @@ ble/util/autoload "$_ble_base/lib/core-complete.sh" \
#------------------------------------------------------------------------------
# 描画設定

ble-color-defface auto_complete bg=254,fg=238
ble-color-defface cmdinfo_cd_cdpath fg=26,bg=155
ble/color/defface auto_complete bg=254,fg=238
ble/color/defface cmdinfo_cd_cdpath fg=26,bg=155
70 changes: 69 additions & 1 deletion note.txt
Expand Up @@ -1605,11 +1605,68 @@ bash_tips
ToDo
-------------------------------------------------------------------------------

2021-09-28

* fast-syntax-highlighting

https://www.reddit.com/r/zsh/comments/oyege0/is_completionaware_syntax_highlighting_possible/
https://github.com/zdharma/fast-syntax-highlighting/tree/master/%E2%86%92chroma
https://github.com/Valodim/zsh-capture-completion

どうやら programmable highlighting に相当する機能は
fast-syntax-highlighting で既に実装されていて "chroma" と呼ばれているらしい。
然し実のところそれ程沢山の実装がある訳でもない。

他に zsh-capture-completion というモジュールに含まれる関数で capture.zsh
'command' を実行すると 'command[TAB]' とした時の補完結果を取得できるらしい。
これは ble.sh の上で作成する事も可能である。補完機能のテストで使うのに便利
な気がする。

bash-completion のテストをコピーできたら良い気がする…。でも全て python で
定義されているうというのは難点である。うーん。結局、その場で補完を実行する
機能を実装したとしても使う機会がないからテストされずに残って意味のない機能
になりそうな気がする。

* https://www.reddit.com/r/commandline/comments/pv1fm8/what_are_the_main_advantages_of_the_various_shells/

fish の便利な機能について紹介している。

* M-{right,left} でディレクトリ移動。これについては異なる keybinding で提供しても良い気がする。

iswitchb の如く C-x C-b 等で探索するのもありではないか?
その際には menu の機能を有効活用できる気がする。

* fish の Abbreviations の振る舞いが気になる。
zsh の zsh-abbr も気になる。

然し、実際に ble.sh をロードさせてテストするというのは有効の気がする。

* menu: C-x C-d で今迄に訪れたディレクトリの一覧。

iswitchb と同様に絞り込みをしたいが入力した文字列は何処に表示するのが良いのか。
panel に表示するのが良いだろうか。或いは、そもそも表示しなくても良いのかもしれない。
何れにせよ太字で表示されるのであるから。

太字ではなくてより強調した形にしても良いのかもしれない。これは face 経由で
設定できる様にするのが良い様な気がする。現在は太字固定になっているが。

* menu: C-x C-j で job 制御用の TUI メニューを表示しても良いのかもしれないとも思う。

2021-09-26

* bash-5.2: array が sparse でない ./configure option が追加された。

もしかすると sparse arrays に declare -gA を指定する必要があるかもしれない。
sparse かつ ordered な配列については簡単な workaround は存在しない。唯、そ
の様な配列を実際に使っているかは分からない。なければ気にしなくて良い。

2021-09-22

* edit: 複数行モードの時は prior/next でページ移動?

* git clone 用の判定
* plug: git clone 用の判定:

これは

$ grep -q '^github\.com' ~/.ssh/known_hosts
$ grep -qEi '[[:space:]]*HostName[[:space:]]+([^[:space:]]+[[:space:]]+)*github\.com' ~/.ssh/config
Expand Down Expand Up @@ -5393,6 +5450,17 @@ bash_tips

2021-10-04

* blerc: 含まれていない face が存在する (reported by Prikalel) [#D1675]
https://github.com/akinomyoga/ble.sh/issues/140

blerc も wiki も共に以下の2つが抜けている。

argument_option
cmdinfo_cd_cdpath

* core-complete-def.sh で ble-color-defface を使っている。
→直した。他に ble-color-defface を使っている箇所はない。

* cmap: find/select が TERM によって定義されていたりいなかったりする [#D1674]

今思ったのだが TERM によって find/select が存在したりしなかったりする事によって、
Expand Down

0 comments on commit 26aaf87

Please sign in to comment.