Skip to content

Commit

Permalink
syntax (simple-word/is-simple-noglob): suppress error messages on exp…
Browse files Browse the repository at this point in the history
…ansions
  • Loading branch information
akinomyoga committed Feb 20, 2021
1 parent 1aa471b commit a56873f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/core-syntax.sh
Expand Up @@ -1132,7 +1132,7 @@ function ble/syntax:bash/simple-word/is-never-word {
function ble/syntax:bash/simple-word/is-simple-noglob {
[[ $1 =~ $_ble_syntax_bash_simple_rex_noglob_word1 ]] && return 0
if [[ $1 =~ $_ble_syntax_bash_simple_rex_noglob_word2 ]]; then
builtin eval -- "local expanded=$1"
builtin eval -- "local expanded=$1" 2>/dev/null
local rex='[*?]|\[.+\]|[*?@+!]\(.*\)'
[[ $expanded =~ $rex ]] || return 0
fi
Expand Down
5 changes: 3 additions & 2 deletions memo/ChangeLog.md
Expand Up @@ -21,6 +21,7 @@
- edit: preserve the state of `READLINE_{LINE,POINT,MARK}` `#D1437` 8379d4a
- edit: change default behavior of <kbd>C-w</kbd> and <kbd>M-w</kbd> to operate on backward words `#D1448` 47a3301
- syntax (`layer:syntax/word`): perform pathname expansions in background subshells (motivated by 3ximus) `#D1449` 13e7bdd
- syntax (`simple-word/is-simple-noglob`): suppress error messages on expansions `#D1461` 0000000
- complete: perform pathname expansions in subshells (motivated by 3ximus) `#D1450` d511896
- complete: support `bleopt complete_timeout_compvar` to time out pathname expansions for `COMP_WORDS` / `COMP_LINE` `#D1457` cc2881a

Expand All @@ -37,7 +38,7 @@
- complete (mandb): fix an encoding prpblem of utf8 manuals `#D1446` 7a4a480
- util (`ble/util/msleep`): fix hang in Cygwin by swithing from `/dev/udp/0.0.0.0/80` to `/dev/zero` `#D1452` d4d718a
- syntax: fix broken AST with `[[` keyword `#D1454` 69658ef
- benchmark (`ble-measure`): work around a locale-dependent decimal point of `EPOCHREALTIME` (reported by 3ximus) `#D1460` 0000000
- benchmark (`ble-measure`): work around a locale-dependent decimal point of `EPOCHREALTIME` (reported by 3ximus) `#D1460` 1aa471b
- global:work around bash-4.2 bug of `declare -gA` (reported by 0xC0ncord) `#D1470` 8856a04
- global: fix declaration of associative arrays for `ble-reload` `#D1471` 3cae6e4

Expand All @@ -49,7 +50,7 @@
- syntax (`ble/syntax:bash/simple-word/eval`): cache `#D1453` 6d8311e
- global: refactor `setup => set up / set-up` `#D1456` c37a9dd
- global: clean up helps of user functions `#D1459` 33c283e
- benchmark (`ble-measure`): support `-T TIME` and `-B TIME` option `#D1460` 0000000
- benchmark (`ble-measure`): support `-T TIME` and `-B TIME` option `#D1460` 1aa471b

<!---------------------------------------------------------------------------->
# ble-0.4.0-devel2
Expand Down
9 changes: 9 additions & 0 deletions note.txt
Expand Up @@ -3813,6 +3813,15 @@ bash_tips

2021-02-03

* syntax: echo ${!_} と入力すると誤った代入ですというエラーメッセージが表示される [#D1461]
そもそも "${!_}" を実行しようとするとエラーメッセージが出るが、
これが着色等の際に発生するのは良くない。何処で発生しているのか確認する必要がある。

これは新しく追加した ble/syntax:bash/simple-word/is-simple-noglob の中で起
こしている展開に対して2>/dev/null を付加すれば良かった。未だ master に push していない
修正なので commit を fixup しようかと思ったが、実装ログが面倒な事になるので、
下手に fixup するのは止める事にする。

* benchmark: EPOCHREALTIME は LC_NUMERIC 依存 (reported by 3ximus) [#D1460]

報告の画像で出ているエラーが何だろうと思って ble-measure の実装を
Expand Down

0 comments on commit a56873f

Please sign in to comment.