Skip to content

Commit

Permalink
main (ble-reload): preserve the original initialization options
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Jul 24, 2022
1 parent 53af663 commit d8c92cc
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 3 deletions.
12 changes: 11 additions & 1 deletion ble.pp
Expand Up @@ -1492,7 +1492,17 @@ function ble/base/print-usage-for-no-argument-command {
[[ $1 != --help ]] && return 2
return 0
}
function ble-reload { source "$_ble_base/ble.sh"; }
function ble-reload {
local -a options=()
ble/array#push options --rcfile="${_ble_base_arguments_rcfile:-/dev/null}"
local name
for name in keep-rlvars noinputrc; do
if [[ :$_ble_base_arguments_opts: == *:"$name":* ]]; then
ble/array#push options "--$name"
fi
done
source "$_ble_base/ble.sh" "${options[@]}"
}

#%$ pwd=$(pwd) q=\' Q="'\''" bash -c 'echo "_ble_base_repository=$q${pwd//$q/$Q}$q"'
#%$ echo "_ble_base_branch=$(git rev-parse --abbrev-ref HEAD)"
Expand Down
5 changes: 3 additions & 2 deletions docs/ChangeLog.md
Expand Up @@ -169,6 +169,7 @@
- complete: generate options by empty-word copmletion after filenames (reported by geekscrapy) `#D1846` 6954b13
- complete: do not show option descriptions for the empty-word completion (requested by geekscrapy) `#D1846` 1c7f7a1
- syntax (`extract-command`): extract unexpected command names as commands `#D1848` XXXXXXX
- main (`ble-reload`): preserve the original initialization options `#D1852` XXXXXXX

## Fixes

Expand Down Expand Up @@ -2320,8 +2321,8 @@

## 2015-08-13
* ble-syntax.sh: clenup, print-status/dump-tree.
* ble-sytanx.sh (_ble_syntax_stat): 解析状態に tchild, tprev (兄・子へのoffset情報) を追加。
* ble-sytanx.sh (_ble_syntax_word): 形式変更。兄・子へのoffset情報はその場で計算する暫定方式。
* ble-syntax.sh (_ble_syntax_stat): 解析状態に tchild, tprev (兄・子へのoffset情報) を追加。
* ble-syntax.sh (_ble_syntax_word): 形式変更。兄・子へのoffset情報はその場で計算する暫定方式。

## 2015-08-12
* memo.txt: _ble_syntax_word 形式変更の計画, ble-syntax.sh: clean up
Expand Down
24 changes: 24 additions & 0 deletions note.txt
Expand Up @@ -1843,6 +1843,16 @@ bash_tips
- Acknowledgments
- keymap の移動 (これは別 commit にする?)

2022-07-20

* konsole drag&drop
https://github.com/akinomyoga/ble.sh/issues/211
https://invent.kde.org/utilities/konsole/-/merge_requests/714

konsole に PR を出したが返事がない。この2日の間に別の PR はマージされている。
暫く待っても何も反応がなかったら Bugzilla の方にも提出する事にする。もしく
はメーリングリストに直接問い合わせる。

2022-07-13

* blehook: blehook の出力結果を init.sh にそのまま載せている人がいる。+= なの
Expand Down Expand Up @@ -6530,6 +6540,20 @@ bash_tips

2022-07-24

* ble-reload の時に最初に指定した rcfile, norc を反映するべきではないか [#D1852]

--norc を指定して起動したセッションでも ble-reload をした時に ~/.blerc を読
み込んでしまっている。

元の引数を全て保持する様にしようと考えたが微妙かもしれない。というのも、元
の引数には --norc 等の引数も指定されているかもしれない。これは bashrc の中
で別に ble-attach を呼び出す事を前提としている物なので ble-reload の時にま
で継承するべきではない。更に --test や --lib 等の別の引数が指定されていた時
にもどの様に取り扱うのか微妙である。

という事を考えると、特定の予め選んだオプションについてだけ記録して再指定す
るべきである。というか特に blerc だけ復元すれば良い気がする。

* starship ble-reload で無限ループ (reported by tars0x9752) [#D1851]
https://github.com/akinomyoga/ble.sh/discussions/212#discussioncomment-3205291

Expand Down

0 comments on commit d8c92cc

Please sign in to comment.