Skip to content

Commit

Permalink
prompt: fix the marker position for rlvar "show-mode-in-prompt"
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Dec 8, 2022
1 parent 88e74cc commit 09bb4d3
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 13 deletions.
2 changes: 2 additions & 0 deletions README-ja_JP.md
Expand Up @@ -288,6 +288,8 @@ $ cp -r ble-0.3.3 /path/to/blesh
[[ ${BLE_VERSION-} ]] && ble-attach
```

この「より確実な設定」が必要になる詳細な条件については [Discussion #254 への回答 (英語)](https://github.com/akinomyoga/ble.sh/discussions/254#discussioncomment-4284757) で説明されています。

## 1.4 初期化スクリプト `~/.blerc` について

ユーザー設定は初期化スクリプト `~/.blerc` (またはもし `~/.blerc` が見つからなければ `${XDG_CONFIG_HOME:-$HOME/.config}/blesh/init.sh`) に記述します。
Expand Down
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -255,6 +255,7 @@ The stable versions are significantly old compared to the devel version, so many

If you want to load `ble.sh` by default in interactive sessions of `bash`, usually one can just source `ble.sh` in `~/.bashrc`,
but more reliable way is to add the following codes to your `.bashrc` file:

```bash
# bashrc

Expand All @@ -267,6 +268,8 @@ but more reliable way is to add the following codes to your `.bashrc` file:
[[ ${BLE_VERSION-} ]] && ble-attach
```

The detailed conditions that we need the above *more reliable setup* are explained in [an answer in Discussion #254](https://github.com/akinomyoga/ble.sh/discussions/254#discussioncomment-4284757).

## 1.4 User settings `~/.blerc`

User settings can be placed in the init script `~/.blerc` (or `${XDG_CONFIG_HOME:-$HOME/.config}/blesh/init.sh` if `~/.blerc` is not available)
Expand Down
2 changes: 1 addition & 1 deletion contrib
Submodule contrib updated 2 files
+29 −10 README.md
+1 −1 fzf-initialize.bash
26 changes: 15 additions & 11 deletions docs/ChangeLog.md
Expand Up @@ -110,8 +110,8 @@
- util (`ble-import`): support option `-q` `#D1859` 1ca87a9
- history: support extension `HISTCONTROL=strip` (motivated by aiotter) `#D1874` 021e033
- benchmark (ble-measure): support an option `-V` `#D1881` 571ecec
- complete: add `bleopt complete_auto_after_complete` `#D1901` xxxxxxx
- color: allow setting color filter by `_ble_color_color2sgr_filter` `#D1902` xxxxxxx
- complete: add `bleopt complete_auto_after_complete` `#D1901` 1478a04
- color: allow setting color filter by `_ble_color_color2sgr_filter` `#D1902` 88e74cc

## Changes

Expand Down Expand Up @@ -203,9 +203,9 @@
- prompt: preserve transient prompt with `same-dir` after `clear-screen` `#D1876` 69013d9
- color: let `bleopt term_index_colors` override the default if specified `#D1878` 7d238c0
- canvas: update Unicode version 15.0.0 `#D1880` 49e55f4
- edit (`display-shell-version`): show `gawk`, `make`, and `git` versions of the build time `#D1892`
- edit (`display-shell-version`): support running as a user command (reported by DhruvaG2000) `#D1893`
- decode (`vi_imap-rlfunc.txt`): update the widget for `backward-kill-word` as `kill-backward-{u => c}word` `#D1896` xxxxxxx
- edit (`display-shell-version`): show `gawk`, `make`, and `git` versions of the build time `#D1892` e618133
- edit (`display-shell-version`): support running as a user command (reported by DhruvaG2000) `#D1893` e618133
- decode (`vi_imap-rlfunc.txt`): update the widget for `backward-kill-word` as `kill-backward-{u => c}word` `#D1896` e19b796

## Fixes

Expand Down Expand Up @@ -318,9 +318,10 @@
- main. util: fix problems of readlink etc. found by test in macOS (reported by aiotter) `#D1849` fa955c1 `#D1855` a22e145
- progcomp: fix a bug that `COMP_WORDBREAKS` is ignored `#D1872` 4d2dd35
- global: quote `return $?` `#D1884` 801d14a
- canvas (`ble/canvas/trace`): fix text justification for empty lines (reported by rashil2000) `#D1894` xxxxxxx
- main: fix adjustments of bash options (reported by rashil2000) `#D1895` xxxxxxx
- complete: suppress error messages for non-bash_completion `_parse_help` (reported by nik312123) `#D1900` xxxxxxx
- canvas (`ble/canvas/trace`): fix text justification for empty lines (reported by rashil2000) `#D1894` cdf74c2
- main: fix adjustments of bash options (reported by rashil2000) `#D1895` 138c476
- complete: suppress error messages for non-bash_completion `_parse_help` (reported by nik312123) `#D1900` 267de7f
- prompt: fix the marker position for the readline variable `show-mode-in-prompt` (reported by Strykar) `#D1903` xxxxxxx

## Documentation

Expand All @@ -329,9 +330,10 @@
- README: describe how to invoke multiple widgets with a keybinding (motivated by michaelmob) `#D1699` 6123551
- README: add links to `bash-it` and `oh-my-bash` `#D1724` 4a2575f
- README: mention the Guix package (motivated by kiasoc5) `#D1888` 0f7c04b
- blerc: add frequently used keybindings (motivated by KiaraGrouwstra, micimize) `#D1896` `#D1897` xxxxxxx
- wiki/Q&A: add item for defining a widget calling multiple widgets (motivated by micimize) `#D1898` xxxxxxx
- blerc: rename from `blerc` to `blerc.template` `#D1899` xxxxxxx
- blerc: add frequently used keybindings (motivated by KiaraGrouwstra, micimize) `#D1896` `#D1897` e19b796
- wiki/Q&A: add item for defining a widget calling multiple widgets (motivated by micimize) `#D1898` e19b796
- blerc: rename from `blerc` to `blerc.template` `#D1899` e19b796
- README: add a link to the explanation on the "more reliable setup" of bashrc (motivated by telometto) `#D1905` xxxxxxx

## Optimization

Expand Down Expand Up @@ -505,6 +507,8 @@
- prompt-git: ignore untracked files in submodules `#D1829` 4d24f84
- contrib/fzf-completion: fix integration (reported by ferdinandyb) `#D1837` 12c022b
- contrib/fzf-completion: remove `noquote` (reported by MK-Alias) `#D1889` 0c6291f
- README: update description on `_ble_contrib_fzf_base` (reported by Strykar) `#D1904` xxxxxxx
- contrib/fzf-initialize: check directory existence before adding it to `PATH` (reported by Strykar) `#D1904` xxxxxxx

<!---------------------------------------------------------------------------->
# ble-0.4.0-devel2
Expand Down
57 changes: 57 additions & 0 deletions note.txt
Expand Up @@ -1855,6 +1855,40 @@ bash_tips
- leakvars
- keymap の移動 (これは別 commit にする?)

2022-12-03

* declare -f の出力は特殊関数名には使えないのではないか?
https://lists.gnu.org/archive/html/bug-bash/2022-12/msg00010.html
https://lists.gnu.org/archive/html/bug-bash/2022-12/msg00011.html

取り敢えず、これは evaldef の時点で function を prefix すれば良い気がする。
今後の Bash の振る舞いの変更で function が追加されるかもしれないので、その
時にはそれを避ける様にする。

更に変数代入の形の関数名は declare -f &>/dev/null でテストする事もできない。

* 2022-10-13 nix completion で止まる問題について。
https://github.com/akinomyoga/ble.sh/issues/58#issuecomment-1272222143

これは説明を書く。何処かにこういうののまとめを書く方が良いのではない
かという気がする。

Sorry for the late reply. I have been busy recent days (and am stil
busy actually...). This is actually one of the compatibility
problems that are hard to solve. ble.sh extends the usage of the
programmable completions for auto-complete

やはり問題を解決してから対処する事にする。

2022-12-03 報告を受けた筈なのに何処かに行ってしまったとおもったら #58 の下
にあった。

* menu-complete: 一時挿入をしない設定
https://github.com/akinomyoga/ble.sh/discussions/252#discussioncomment-4293518

* colorglass: saturation (彩度) についての設定を追加する (motivated by auwsom)
https://github.com/akinomyoga/ble.sh/issues/258

2022-10-02

* prompt: dirty 状態の更新時にカーソル位置がずれる。
Expand Down Expand Up @@ -6611,6 +6645,29 @@ bash_tips
Done (実装ログ)
-------------------------------------------------------------------------------

2022-12-03

* README: bashrc 設定の背景に対するリンクを載せる (motivated by telometto) [#D1905]
https://github.com/akinomyoga/ble.sh/discussions/254#discussioncomment-4284757

日本語の説明はないが仕方がない。

* contrib/README: PATH に fzf が見つかれば _ble_contrib_fzf_base は設定しなくて良い (reported by Strykar) [#D1904]
https://github.com/akinomyoga/blesh-contrib/issues/9

修正した。というか手動で指定したとしても fzf を PATH の中に見つける事ができ
なければ結局動かないのではないか? と思ったが fzf-initialize の中にちゃんと
PATH を追加する処理が組み込まれていた。

と思ったが、存在しないディレクトリを追加していたりしないか? →している。こ
れはディレクトリが存在する時にだけ PATH に追加する事にした。

* prompt: bind 'set show-mode-in-prompt on' が何故か PS1 の後に表示される? (reported by Strykar) [#D1903]
https://github.com/akinomyoga/ble.sh/discussions/256
https://github.com/akinomyoga/ble.sh/discussions/257

実際に試してみるとそうなっている。変なミスである。。。修正した。

2022-12-01

* contrib/colorglass: 実験的に実装したものを追加する事にした [#D1902]
Expand Down
2 changes: 1 addition & 1 deletion src/edit.sh
Expand Up @@ -1311,7 +1311,7 @@ function ble/prompt/.instantiate {
(vi_[noxs]map) ble/util/rlvar#read vi-cmd-mode-string '(cmd)' ;; # Note: bash-4.3 では ':'
(emacs) ble/util/rlvar#read emacs-mode-string '@' ;;
esac
[[ $ret ]] && expanded=$expanded$ret
[[ $ret ]] && expanded=$ret$expanded
fi
fi

Expand Down

0 comments on commit 09bb4d3

Please sign in to comment.