Skip to content

Commit

Permalink
README: update GitHub Issue templates and other documentation
Browse files Browse the repository at this point in the history
* update GitHub Issue templates
* add note on "history_limit_length" when "line_limit_type=editor"
* support "ble summary" to call "ble/widget/display-shell-version"
  safely (e.g. without being affected by "set -o posix").
* fix missing highlighting in "ble/widget/display-shell-version".
  • Loading branch information
akinomyoga committed Dec 10, 2024
1 parent b0a7adc commit aa396f6
Show file tree
Hide file tree
Showing 13 changed files with 434 additions and 42 deletions.
23 changes: 15 additions & 8 deletions .github/ISSUE_TEMPLATE/00_T1-bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,22 @@ about: Create a report to fix problems

---

**ble version**: <!-- The version and commit-hash or the result of `echo "$BLE_VERSION"` -->
**Bash version**: <!-- The result of `echo "$BASH_VERSION ($MACHTYPE)"` -->
<!-- Instead of the above, you can copy and paste the result of running the
command "ble/widget/display-shell-version" or the result of pressing
[Ctrl-x][Ctrl-v] in a ble.sh session with the issue. -->
```console
$ ble summary

<!-- Describe the problem here. If example terminal contents (in either the
text form or an image) are available, you may paste/insert them to explain
the situation more clearly.
<!-- Include the output of the above command in the ble.sh session in which the
problem occurs. If you cannot get the command result, see
https://github.com/akinomyoga/ble.sh/wiki/Reporting-Issue#user-content-ble-summary
-->
```

<!-- Describe the problem here.
Additionally, if example terminal contents (in either the text or image form)
are available, you may paste/insert them to explain the situation more
clearly. Even with examples, please explain "what you did" and "what you
expect" in text. For details, see
https://github.com/akinomyoga/ble.sh/wiki/Reporting-Issue#user-content-video
Note: In most cases, in reply, we will ask further questions to investigate
the problem in detail. Please don't hesitate to RESPOND TO THE QUESTIONS, or
Expand Down
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/00_T2-feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@ about: Suggest an idea for this project

---

```console
$ ble summary

<!-- Please include the result of the above command if applicable. -->
```

<!-- You can describe the request in a free way. -->
9 changes: 8 additions & 1 deletion .github/ISSUE_TEMPLATE/00_T3-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,11 @@ about: Questions on usage

---

<!-- Describe your question or problem here. If sample terminal contents are available, you may copy and paste them here. -->
```console
$ ble summary

<!-- Please include the result of the above command. -->
```

<!-- Describe your question or problem here. If sample terminal contents are
available, you may copy and paste them here. -->
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/00_T4-free_style.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@ about: Miscellaneous discussion, etc.

---

```console
$ ble summary

<!-- Please include the result of the above command if applicable. -->
```

<!-- You can write anything here. -->
18 changes: 12 additions & 6 deletions .github/ISSUE_TEMPLATE/01_T1-bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@ about: 問題報告ありがとうございます! どんなに些細なこと

---

**ble version**: <!-- ble.sh をロードした上で `echo $BLE_VERSION` で確認できる値。または ble のバージョン及びコミットハッシュ -->
**Bash version**: <!-- `echo "$BASH_VERSION ($MACHTYPE)"` で確認できる値。または Bash のバージョン及び環境 -->
<!-- 以上の情報の代わりに、問題の発生する ble.sh をロードした状態で、コマンド
"ble/widget/display-shell-version" を実行した結果、または [Ctrl-x][Ctrl-v] を
押した結果をコピー・貼り付けしていただく事も可能です。 -->
```console
$ ble summary

<!-- 問題が発生する ble.sh セッションで上記コマンドを実行した時の出力結果を含め
てください。同じ情報を ble.sh セッションの内部で [Ctrl-x][Ctrl-v] を押すことに
よっても得られます。ble.sh セッションを開始することができない場合には、代わりに
ble.sh の commit hash (バージョン) と、`echo "$BASH_VERSION ($MACHTYPE)"` で確
認できる Bash のバージョンを含めてください。 -->
```

<!--- 問題についてここに自由に記述して下さって差し支えありません! 不明な点があ
ればまたこちらからお尋ねしますのでご安心下さいませ。もし問題の発生している端
末の画面の様子があれば、内容をコピー&ペーストして頂けると分かりやすいかもしれ
ないので御一考頂ければ幸いです。 -->
ないので御一考頂ければ幸いです。動画で問題を説明する際にはキーボードから何を
入力したのかの説明も含めてください。動画だけではどの様な操作が行われた結果で
あるか知ることができません。 -->
7 changes: 7 additions & 0 deletions README-ja_JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,13 @@ make INSDIR="$HOME/.local/share/blesh" install
- キャッシュディレクトリ `~/.cache/blesh` が生成されていればそれを削除します。
- 一時ディレクトリ `/tmp/blesh` が生成されていればそれを削除します。これは `/tmp` の内容が自動的にクリアされないシステムで必要です。

## 1.7 トラブルシューティング

- [Performance](https://github.com/akinomyoga/ble.sh/wiki/Performance) (英語)
では `ble.sh` の動作速度の改善に関する情報について説明しています。
- [Reportin Issues](https://github.com/akinomyoga/ble.sh/wiki/Reporting-Issues)
(英語) では問題報告をする前に確認しておくと良い情報を説明しています。

# 2 基本設定

ここでは `~/.blerc` に記述する基本的な設定を幾つか紹介します。
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,13 @@ Basically you can simply delete the installed directory and the settings that th
- Remove the cache directory `~/.cache/blesh` if any.
- Remove the temporary directory `/tmp/blesh` if any [ Only needed when your system does not automatically clear `/tmp` ].

## 1.7 Troubleshooting

- [Performance](https://github.com/akinomyoga/ble.sh/wiki/Performance)
describes hints for perfomance issue is described
- [Reportin Issues](https://github.com/akinomyoga/ble.sh/wiki/Reporting-Issues)
describes information that you may check before reporting an issue.

# 2 Basic settings

Here, some of the settings for `~/.blerc` are picked up.
Expand Down
38 changes: 32 additions & 6 deletions ble.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2474,8 +2474,15 @@ function ble/dispatch/.help {
' hook ... alias of blehook' \
' sabbrev ... alias of ble-sabbrev' \
' palette ... alias of ble-color-show' \
'' \
' # Diagnostics' \
' summary ... Summarize the current shell setup' \
''
}
function ble/dispatch:summary {
ble/widget/display-shell-version
}

function ble/dispatch {
if (($#==0)); then
[[ $_ble_attached && ! $_ble_edit_exec_inside_userspace ]]
Expand All @@ -2499,14 +2506,33 @@ function ble/dispatch {
(version|--version) ble/util/print "ble.sh, version $BLE_VERSION (noarch)" ;;
(check|--test) ble/base/sub:test "$@" ;;
(*)
if ble/string#match "$cmd" '^[-a-zA-Z0-9]+$' && ble/is-function "ble-$cmd"; then
"ble-$cmd" "$@"
elif ble/is-function ble/bin/ble; then
if ble/string#match "$cmd" '^[-a-zA-Z0-9]+$'; then
if ble/is-function "ble/dispatch:$cmd"; then
"ble/dispatch:$cmd" "$@"
return "$?"
elif ble/is-function "ble-$cmd"; then
"ble-$cmd" "$@"
return "$?"
fi
fi

if ble/is-function ble/bin/ble; then
# There seems to be an existing command "ble" for BLE (Bluetooth Low
# Energy) which has the following subcommands [1]: abort, begin,
# callback, characteristics, close, connect, descriptors, disable,
# disconnect, dread, dwrite, enable, equal, execute, expand, getrssi,
# info, mtu, pair, read, reconnect, scanner, services, shorten, start,
# stop, unpair, userdata, write. If we receive an unknown subcommand and
# an external command "ble" exists, we redirect the call to the external
# command "ble".
#
# [1] https://www.androwish.org/home/wiki?name=ble+command
ble/bin/ble "$cmd" "$@"
else
ble/util/print "ble (ble.sh): unrecognized subcommand '$cmd'." >&2
return 2
return "$?"
fi

ble/util/print "ble (ble.sh): unrecognized subcommand '$cmd'." >&2
return 2
esac
}
function ble {
Expand Down
5 changes: 4 additions & 1 deletion blerc.template
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,10 @@
## characters exceeds the capacity. The value `truncate` means that the
## command line is truncated from its end to fit into the capacity. The value
## `editor` means that the widget `edit-and-execute` will be invoked to open an
## editor to edit the command line contents.
## editor to edit the command line contents. When the value `editor` is
## specified, `bleopt history_limit_length` is recommended to be less than or
## equal to `bleopt line_limit_length`. Otherwise, the text editor may be
## unexpectedly executed in navigating through the history.

#bleopt line_limit_type=none

Expand Down
8 changes: 4 additions & 4 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

You can freely create an issue using the following links:

- Report and fixes for bugs and performance issues [[Here]](https://github.com/akinomyoga/ble.sh/issues/new?template=bug_report.md)
- Questions on usage [[Here]](https://github.com/akinomyoga/ble.sh/issues/new?template=feature_request.md)
- Feature request [[Here]](https://github.com/akinomyoga/ble.sh/issues/new?template=help.md)
- Others (suggestions, projects, discussion, complaints, news, information or anything) [[Here]](https://github.com/akinomyoga/ble.sh/issues/new?template=free_style.md)
- Report and fixes for bugs and performance issues [[Here]](https://github.com/akinomyoga/ble.sh/issues/new?template=00_T1-bug_report.md)
- Questions on usage [[Here]](https://github.com/akinomyoga/ble.sh/issues/new?template=00_T2-feature_request.md)
- Feature request [[Here]](https://github.com/akinomyoga/ble.sh/issues/new?template=00_T3-help.md)
- Others (suggestions, projects, discussion, complaints, news, information or anything) [[Here]](https://github.com/akinomyoga/ble.sh/issues/new?template=00_T4-free_style.md)

### Pull requests

Expand Down
13 changes: 7 additions & 6 deletions docs/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
- edit (`ble/widget/display-shell-version`): print shell options `#D2261` 70b89e5e ed5d451b
- edit: enable `BLE_PIPESTATUS` and `PIPESTATUS` in `PROMPT_COMMAND` and prompts (requested by mattmc3) `#D2276` 27888830
- nsearch: support `action={load-{line,command},insert{,-line}}` (motivated by vaab) `#D2286` 32f290df
- complete: support completion for `execute-named-command` `#D2288` xxxxxxxx
- complete: support `ble-face menu_complete_{match,selected}` (requested by simonLeary42) `#D2291` xxxxxxxx
- complete: support completion for `execute-named-command` `#D2288` 4fee44e6
- complete: support `ble-face menu_complete_{match,selected}` (requested by simonLeary42) `#D2291` 31f264ad

## Changes

Expand Down Expand Up @@ -207,7 +207,7 @@
- histdb: support subcommands `#D2167` 4d7dd1ee
- histdb: support `top`, `stats`, `calendar`, and `week` `#D2167` 4d7dd1ee
- histdb: unify the color palette selection `#D2167` 4d7dd1ee
- histdb: fix the seasonal default palette names `#D2289` xxxxxxxx
- histdb: fix the seasonal default palette names `#D2289` 4fee44e6
- contrib/fzf-git: update to be consistent with the upstream (motivated by arnoldmashava) `#D2054` c78e5c9f
- contrib/layer/pattern: add `{pattern}` layer `#D2074` 449d92ca
- contrib/fzf-git: fix unsupported command modes (reported by dgudim) `#D2083` ba2b8865
Expand All @@ -224,9 +224,9 @@
- contrib/colorglass: color: import themes from `Gogh-Co/Gogh` (motivated by d4rkb4sh8) `#D2274` d2eb75b5
- contrib/integration/fzf-completion: suppress unexpected quoting by compgen in dynamic completions (reported by mcepl) `#D2284` 32f290df
- contrib/integration/fzf-initialize: use `fzf --bash` when shell integration files are not found (motivated by louiss0) `#D2285` 32f290df
- integration/fzf-initialize: (reported by 3ximus) `#D2285` xxxxxxxx
- integration/fzf-initialize: (reported by 3ximus) `#D2285` a36d13ce
- config: add `github499-append-to-last-modified` (motivated by vaab) `#D2286` 32f290df
- integration: add `skim` integration for completion (reported by cmm) `#D2287` xxxxxxxx
- integration: add `skim` integration for completion (reported by cmm) `#D2287` a36d13ce

## Documentation

Expand All @@ -238,7 +238,8 @@
- docs(README): add sabbrev example for named directories `#D2115` a9a21a0e
- docs(README): note `bleopt prompt_command_changes_layout=1` `#D2196` 208eaa9d
- docs(README): move disclaimers to a later section `#D2250` ad6f58b7
- README: use `[[ ! ${BLE_VERSION-} ]] || ble-attach` `#D2264` xxxxxxx
- README: use `[[ ! ${BLE_VERSION-} ]] || ble-attach` `#D2264` ed11901a
- github: update GitHub issue templates `#D2294` xxxxxxxx

## Test

Expand Down
Loading

0 comments on commit aa396f6

Please sign in to comment.