Patch 0.3.4
ble-0.3.4 (2023-04-03)
Usage
Prerequisites
Bash 3.0+ and basic POSIX utilities are required.
Download ble-0.3.4.tar.xz
https://github.com/akinomyoga/ble.sh/releases/download/v0.3.4/ble-0.3.4.tar.xz
# DOWNLOAD with wget
wget https://github.com/akinomyoga/ble.sh/releases/download/v0.3.4/ble-0.3.4.tar.xz
# DOWNLOAD with curl
curl -LO https://github.com/akinomyoga/ble.sh/releases/download/v0.3.4/ble-0.3.4.tar.xz
Trial & Install
# TRIAL
tar xJf ble-0.3.4.tar.xz
source ble-0.3.4/ble.sh
# INSTALL
tar xJf ble-0.3.4.tar.xz -C ~/.local/share/blesh
# Add the following line near the top of ~/.bashrc
[[ $- == *i* ]] && source ~/.local/share/blesh/ble.sh --attach=none
# Add the following line at the end of ~/.bashrc
[[ ${BLE_VERSION-} ]] && ble-attach
blesh-0.3 Fixes
- decode: fix
bind
emulation in .bashrc (v0.3) 742777e - global: pick fixes and changes from ble-0.1..0.2 backports 78bbc5e
- bump 0.3.4 9da6774
Fixes
- complete: fix a problem that candidates are not updated after menu-filter (reported by 3ximus)
#D1428
1c7786e (master: 98fbc1c) - edit: work around the wrong job information of Bash in trap handlers (reported by 3ximus)
#D1435
#D1436
d40847f (master: bc4735e) - edit (command-help): work around the Bash bug that tempenv vanishes with
builtin eval
#D1438
cc8ca96 (master: 8379d4a) - global: suppress missing locale errors (reported by 3ximus)
#D1440
b52a798 (master: 4d3c595) - edit (sword): fix definition of
sword
(shell words)#D1441
2370bce (master: f923388) - edit (
kill-forward-logical-line
): fix a bug not deleting newline at the end of the line#D1443
2a8a7f6 (master: 09cf7f1) - global: work around bash-4.2 bug of
declare -gA
(reported by 0xC0ncord)#D1470
2f85ed3 (master: 8856a04) - global: fix declaration of associative arrays for
ble-reload
(reported by 0xC0ncord)#D1471
422de69 (master: 3cae6e4) - util (
ble/util/msleep
): fix hang in Cygwin by swithing from/dev/udp/0.0.0.0/80
to/dev/zero
#D1452
5ace564 (master: d4d718a) - syntax: fix broken AST with
[[
keyword#D1454
1d48e79 (master: 69658ef) - benchmark (
ble-measure
): work around a locale-dependent decimal point ofEPOCHREALTIME
(reported by 3ximus)#D1460
f3833ad (master: 1aa471b) - util (
ble/util/msleep
): work around the bash-4.3 bug ofread -t
(reported by 3ximus)#D1468
#D1469
70797cf (master: 4ca9b2e) - bind: work around broken
cmd_xmap
after switching the editing mode#D1478
909f461 (master: 8d354c1) - edit: clear graphic rendition on newlines and external commands
#D1479
59ede5c (master: 18bb2d5) - decode (rlfunc): work around incomplete bytes in keyseq (reported by onelittlehope)
#D1483
948a38d (master: 3559658) beb0383 37363be - canvas: fix a glitch that SGR at the end of command line is applied to new lines
#D1498
6871634 (master: 4bdfdbf) - syntax: fix a bug that
eval() { :; }
,declare() { :; }
are not treated as function definition#D1529
6c1d295 (master: b429095) - decode: fix a hang on attach failure by cache corruption
#D1531
d4b0700 (master: 24ea379) - progcomp: fix non-working
complete -C prog
(reported by Archehandoro)#D1535
47b3ade (master: 026432d) - bind: fix a problem that
bind '"seq":"key"'
causes a loop macrobind -s key key
(reported by thanosz)#D1536
e2a502d (master: ea05fc5) - main: work around
. ble.sh --{test,update,clear-cache}
in intereactive sessions#D1555
500915f (master: bbc2a90) - main: fix reloading after ble-update (fixup 500915f (master: bbc2a90)) (fixed by oc1024)
#D1558
9372670 - main: fix exit status for
bash ble.sh --test
(fixup 500915f (master: bbc2a90))#D1558
641238a - main: work around sourcing
ble.sh
inside subshells#D1554
500915f (master: bbc2a90) - global: use a better workaround of bash-4.2
declare -gA
by separating assignment#D1567
40827ef (master: 2408a20) - util: work around bash-3.0 bug
"${scal[@]/xxx}"
#D1570
7e10cf4 (master: 24f79da) - syntax: fix a bug that argument completion is attempted in nested commands (reported by huresche)
#D1579
6987ae8 (master: 301d40f) - edit (brackated-paste): fix incomplete
CR => LF
conversion (reported by alborotogarcia)#D1587
2651c8e (master: 8d6da16) - main (adjust-bash-options): adjust
LC_COLLATE=C
#D1588
94cc9d2 (master: e87ac21) - highlight (
layer:region
): fix blocked lower-layer changes without selection changes#D1596
d40d42a (master: 5ede3c6) - complete (
auto-menu
): fix sleep loops by clock/sclock difference#D1597
0abc15b (master: 53dd018) - util: work around the Bash 3 bug of array assignments with
^A
and^?
in Bash 3.2#D1614
0eac4df (master: b9f7611) - benchmark (
ble-measure
): fix a bug that the result is always 0 in Bash 3 and 4 (fixup bbc2a90)#D1615
bc3cdab (master: a034c91) - decode, canvas, etc.: explicitly treat CSI arguments as decimal numbers (reported by GorrillaRibs)
#D1625
97bce68 (master: c6473b7) 2ea48d7 - edit: fix a bug that
command-help
doesn't work#D1635
c375fbb (master: 0f6a083) - complete: fix a task scheduling bug of referencing two different clocks (reported by rashil2000)
#D1636
df9f932 (master: fea5f5b) - canvas: update prompt trace on
char_width_mode
change (reported by Barbarossa93)#D1642
00f9ce8 (master: 68ee111) - decode: fix a bug that the characters input while initialization are delayed
#D1670
734bd50 (master: 430f449) - util (
ble/util/readfile
): fix a bug of always exiting with 1 inbash <= 3.2
(reported by laoshaw)#D1678
51d244a (master: 61705bf) - trace: fix wrong positioning of the ellipses on overflow
#D1684
dea87c7 (master: b90ac78) - mandb: generate completions of options also for the empty word
#D1689
dea87c7 (master: b90ac78) - complete: do not generate keywords for quoted command names
#D1691
5b1e5be (master: 60d244f) - menu (menu-style:align): fix the failure of delaying
ble/canvas/trace
on items (motivated by banoris)#D1710
3d56593 (master: acc9661) - complete: fix empty completions with
FIGNORE
(reported by seanfarley)#D1711
49e75ee (master: 144ea5d) - main: fix the message of owner errors of cache directories (reported by zim0369)
#D1712
02aeb4a (master: b547a41) - util (
ble/string#escape-for-bash-specialchars
): fix escaping of TAB#D1713
accf8f3 (master: 7db3d2b) - util (visible-bell): erase visible-bell before running external commands
#D1723
72a11ae (master: 0da0c1c) - util (
ble/function
): work aroundshopt -u extglob
#D1725
3819e83 (master: 952c388) - syntax: fix uninitialized syntax-highlighting in bash-3.2
#D1731
7bd03a5 (master: e3f5bf7) - main: fix the workaround for
set -eu
and refactor#D1743
a949af0 (master: 6a946f0) - progcomp: retry completions on
$? == 124
also for non-default completions (reported by SuperSandro2000)#D1759
e217932 (master: 82b9c01) - util (
ble/util/import
): work around filenames with bash special characters#D1763
4179e3d (master: b27f758) - edit: fix the restore failure of
PS1
andPROMPT_COMMAND
onble-detach
#D1784
4f4c924 (master: b9fdaab) - complete: do not attempt an independent rhs completion for arguments (reported by rsteube)
#D1787
7bf32ca (master: f8bbe2c) - history: work around possible dirty prefix
*
in the history output#D1808
84184ce (master: 64a740d) - util(
ble/util/eval-pathname-expansion
): fix restoring shopt options in bash-4.0#D1825
d3b3f7b (master: 736f4da) - decode: fix the workaround for
set -e
with--prompt=attach
#D1832
51cb735 (master: 5111323) - decode (
encoding:C
): fix initialization for isolated ESC#D1839
aaa74b5 (master: c3bba5b) - main. util: fix problems of readlink etc. found by test in macOS (reported by aiotter)
#D1849
a1adc7f (master: fa955c1)#D1855
a22e145 - progcomp: fix a bug that
COMP_WORDBREAKS
is ignored#D1872
b338066 (master: 4d2dd35) - global: quote
return $?
#D1884
4f14f7a (master: 801d14a) - main: fix adjustments of bash options (reported by rashil2000)
#D1895
7bd25c9 (master: 138c476) - decode: fix a bug that the tab completion do not work with bash-4.4 and lower
#D1928
6351e7f (master: 7da9bce) - bind: fix M-C-@, C-x C-@, and M-C-x (
bash-4.2 -o emacs
)#D1920
02f45f3 (master: a410b03) - complete: fix non-working ambiguous path completion with
..
and.
in the path#D1930
fdb76e9 (master: 632e90a) - main (ble-reload): fix failure by non-existent rcfile
#D1931
58de996 (master: b7ae2fa) - util: fix ble/util/clock in bash-4.2 [main: fix the timestamp in the session ID in bash-4.2]
#D1954
9a24b1e (master: 651c70c) - edit (
ble/textarea#render
): fix interleaving outputs to_ble_util_buffer
andDRAW_BUFF
#D1987
62519a7 (master: 6d61388) - keymap/vi (
operator:filter
): do not append newline at the end of line#D1994
8207d4f (master: bce2033) - keymap/vi (
expand-range-for-linewise-operator
): fix the end point being not extended#D1994
8207d4f (master: bce2033) - syntax: fix unrecognized asignment
echo arr[i]+=rhs
[sabbrev: apply sabbrev to right-hand sides of variable assignments]#D2007
948f50f (master: 41faa49)
Changes
- syntax: exclude
\ + LF
at the word beginning from words (motivated by cmplstofB)#D1431
1b00fd2 (master: 67e62d6) - edit: preserve the state of
READLINE_{LINE,POINT,MARK}
#D1437
cc8ca96 (master: 8379d4a) - edit: change default behavior of C-w and M-w to operate on backward words
#D1448
b1fd84a (master: 47a3301) - edit (
ble/builtin/read
): cancel by C-d on an empty line#D1473
4fae77a (master: ecb8888) - syntax: change syntax context after
time ;
and! ;
for Bash 4.4#D1477
e55e3df (master: 4628370) - decode (rlfunc): update mapping
vi-replace
inimap
andvi-editing-mode
innmap
(reported by onelittlehope)#D1484
3a2d0fe (master: f2ca811) - prompt: invalidate prompt and textarea on prompt setting changes
#D1492
e28f330 (master: 1f55913) - main: accept non-regular files as
blerc
and add option--norc
#D1530
4b0eb87 (master: 7244e2f) - prompt: adjust behavior of
LINENO
and prompt sequence\#
(reported by tycho-kirchner)#D1542
f3668ba (master: 8b0257e) - main: show notifications against debug versions of Bash
#D1612
0ee8415 (master: 8f974aa) - edit: suppress only
stderr
withinternal_suppress_bash_output
(motivated by rashil2000)#D1646
b0a9021 (master: a30887f) - prompt: do not evaluate
PROMPT_COMMAND
for subprompts#D1654
9c0e515 (master: 08e903e) - main: suppress non-interactive warnings from manually sourced startup files (reported by andreclerigo)
#D1676
a602876 (master: 0525528) 88e2df5 - main: suppress non-interactive warnings from manually sourced startup files (reported by andreclerigo)
#D1676
0525528 79efd42 (master: 88e2df5) - syntax: revert 99f2234 (master: 371a5a4) and generate empty completion source on syntax error
#D1609
e09fcab - syntax: do not start argument completions immediately after previous word (reported by EmilySeville7cfg)
#D1690
99f2234 (master: 371a5a4) - syntax: revert 371a5a4 and generate empty completion source on syntax error
#D1609
a1d1286 (master: e09fcab) - canvas: do not insert explicit newlines on line folding if possible (reported by banoris)
#D1745
d878fce (master: 02b9da6) dc3827b - edit (
ble-bind -x
): preserve multiline prompts on execution ofbind -x
commands (requested by SuperSandro2000)#D1755
240bfaa (master: 7d05a28) - util (
ble/util/buffer
): hide cursor in rendering#D1758
5907567 (master: e332dc5) - complete (
action:file
): always suffix/
to complete symlinked directory names (reported by SuperSandro2000)#D1759
ebdc58b (master: 397ac1f) - edit: fix layout with
prompt_rps1
caused by missingopts=relative
forble/textmap#update
#D1769
e799191 (master: f6af802) - edit (
ble-detach
): prepend a space tostty sane
forHISTIGNORE=' *'
#D1796
31bc2b7 (master: 26b532e) - edit: the widgets
{kill,copy,delete}-region-or
now receives widgets as arguments#D1021
e222c48 (master: bbbd155) - decode (
bind
): do not treat non-beginning#
as comments#D1820
f9db7d8 (master: 65c4138) - history: disable the history file when
HISTFILE
is empty#D1836
7153250 (master: 9549e83) - main (
ble-reload
): preserve the original initialization options#D1852
8912d81 (master: d8c92cc) - progcomp: reproduce arguments of completion functions passed by Bash
#D1872
b338066 (master: 4d2dd35) - color: let
bleopt term_index_colors
override the default if specified#D1878
e7c657c (master: 7d238c0) - decode (
vi_imap-rlfunc.txt
): update the widget forbackward-kill-word
askill-backward-{u => c}word
#D1896
3c4e3a4 (master: e19b796) - term (
_ble_term_TERM
): detect wezterm-20220408#D1909
f3a8382 (master: 486564a) - keymap/vi (
decompose-meta
): translate S-a to A#D1988
9e0c187 (master: 600e845) - term (
_ble_term_TERM
): detect konsole#D1988
9e0c187 (master: 600e845) ed53858
Compatibility
- term: work around leaked DA2R in screen from outside terminal
#D1485
4d77fab (master: e130619) - util (
modifyOtherKeys
): work around a quirk of kitty (reported by NoahGorny)#D1549
823eb83 (master: f599525) - global: work around empty
vi_imap
cache bytmux-resurrect
#D1562
d7d2a23 (master: 560160b) - decode: identify
kitty
and treat\e[27u
as isolated ESC (reported by lyiriyah)#D1585
2f7404e (master: c2a84a2) - complete: suppress known error messages of
bash-completion
(reported by oc1024, Lun4m)#D1622
558322c (master: d117973) - util (
modifyOtherKeys
): update the workaround for a new quiark of kitty#D1627
90d9284 (master: 3e4ecf5) - main: work around
set -B
andset -k
#D1628
55494eb (master: a860769) - term: disable
modifyOtherKeys
and do not sendDA2
forst
(requested by Shahabaz-Bagwan)#D1632
7e08766 (master: 92c7b26) - cmap: add
st
-specific escape sequences for cursor keys#D1633
1391c90 (master: acfb879) - cmap: distinguish find/select from home/end for openSUSE
inputrc.keys
(reported by cornfeedhobo)#D1648
886cc07 (master: c4d28f4) - cmap: freeze the internal codes of find/select and kitty special keys
#D1674
7d02058 (master: fdfe62a) - decode: work around the overwritten builtin
set
(reported by eadmaster)#D1680
5acb117 (master: a6b4e2c) - util (
modifyOtherKeys
): use the kitty protocol for kitty 0.23+ which removes the support ofmodifyOtherKeys
(reported by kovidgoyal)#D1681
696264b (master: ec91574) - complete: work around the variable leaks by
virsh
completion fromlibvirt
(reported by telometto)#D1682
7a65fc3 (master: f985b9a) - stty: do not remove keydefs for C-u, C-v, C-w, and C-? (reported by laoshaw)
#D1683
ff8fb83 (master: 82f74f0) - decode (
ble/builtin/bind
): improve compatibility of the deprecated formbind key:rlfunc
(motivated by cmplstofB)#D1698
c3904ff (master: b6fc4f0) - main: work around
XDG_RUNTIME_DIR
of a different user bysu
(reported by zim0369)#D1712
dbf58e4 (master: 8d37048) - main (
ble/util/readlink
): work around non-standard or missingreadlink
(motivated by peterzky)#D1720
60595bd (master: a41279e) - decode (
ble/builtin/bind
): fix a bug that only lowercase is accepted for deprecated formbind key:rlfunc
(reported by returntrip)#D1726
43cf9b9 (master: a67458e) e363f1b - decode (
ble/builtin/bind
): fix a bug that only lowercase is accepted for deprecated formbind key:rlfunc
(reported by returntrip)#D1726
a67458e dd358d7 (master: e363f1b) - global: work around the arithmetic syntax error of
10#
in Bash-5.1#D1734
b321b57 (master: 7545ea3) - global: adjust implementations for Bash 5.2
patsub_replacement
#D1738
66ae615 (master: 4590997) - main: check
/dev/tty
on startup (reported by andychu)#D1749
e6c2855 (master: 711c69f) - global: work around
shopt -s compat42
#D1754
1f254b5 (master: a75bb25) - global: identify bash-4.2 bug that internal quoting of
${v/%$empty/"$rep"}
remains#D1753
1f254b5 (master: a75bb25) - prompt: fix a bug of
ble/prompt/print
redundantly quoting$
#D1752
1f254b5 (master: a75bb25) - global: work around
compat42
quoting of"${v/pat/"$rep"}"
#D1751
1f254b5 (master: a75bb25) - util: add identification of Windows Terminal
wt
#D1758
5907567 (master: e332dc5) - global: work around bash-3.0 bug that single quotes remains for
"${v-$''}"
#D1774
30440b2 (master: 9b96578) - util (
modifyOtherKeys
): fix a bug that kitty protocol is never activated#D1842
f8aeb51 (master: 14f3c81) - util (
modifyOtherKeys
): work around delayed terminal identification#D1842
f8aeb51 (master: 14f3c81) - main: resolve empty
HOSTNAME
[originally: contrib: addhistdb
]#D1925
e82230e (master: 44d9e10) - main: warn empty
LANG
[originally: main: support an option--inputrc={diff,all,user,none}
]#D1926
ede4ee7 (master: 92f2006) - term (
terminology
): work around terminal glitches#D1946
ccb93a5 (master: 9a1b4f9) - edit: always adjust the terminal states with
bind -x
(reported by linwaytin)#D1983
992131c (master: 5d14cf1) - syntax: suppress brace expansions in designated array initialization in Bash 5.3
#D1989
1f0d8e1 (master: 1e7b884) - util (function#evaldef): work around
set -e
[progcomp: work around slownix
completion]#D1997
2ab4e4b (master: 2c1aacf) - util (
string#quote-word
): work aroundset -ue
[util, edit: addble/util/message
andble append-line
]#D2001
2317562 (master: 2a524f3) - complete: suppress error messages from
_adb
#D2005
2f77171 (master: f2aa32b) - edit: restore
PS1
while processingbind -x
#D2024
604c092 (master: 2eadcd5)
Optimization
- complete (
ble/complete/source:file
): remove slow old codes (reported by timjrd)#D1512
60a33e2 (master: e5be0c1) - util (
ble/util/assign
): work around subshell conflicts#D1578
4117d1b (master: 6e4bb12) - prompt: fix not properly set
$?
in${PS1@P}
evaluation (reported by nihilismus)#D1644
a3cfd0d (master: 521aff9) - util (
ble/string#split
): optimize#D1826
9dcbbd4 (master: 7bb10a7) - debug: add
ble/debug/profiler
(motivated by SuperSandro2000)#D1824
f629698 11aa4ab 9dcbbd4 (master: 7bb10a7) - global: avoid passing arbitrary strings through
awk -v var=value
#D1827
9edb1aa (master: 82232de)
Internal changes and fixes
- main: include hostname in local runtime directory
#D1444
3e648a9 (master: 6494836) - benchmark (
ble-measure
): support-T TIME
and-B TIME
option#D1460
f3833ad (master: 1aa471b) - global: fix status check for read timeout
#D1467
f190f9a (master: e886883) - util, etc: ensure each function to work with arbitrary
IFS
#D1490
#D1491
c33fad0 (master: 5f9adfe) - global: work around
localvar_inherit
for varname-list init#D1566
8c67b79 (master: 5c2edfc) - util: fix
ble/util/dense-array#fill-range
e397120 (master: a46fdaf) - util: fix leak variables
buff
,trap
,{x,y}{1,2}
#D1572
82113e9 (master: 5967d6c) - util: fix leak variables
#D1643
0817df6 (master: fcf634b) - edit (
command-help
): useble/util/assign/.mktmp
to determine the temporary filename#D1663
2ff6078 (master: 1af0800) - Makefile: add fallback Makefile for BSD make
#D1805
ea8b966 (master: e5d8d00) - util, decode, vi: fix leak variables
#D1933
9e2e823 (master: 8d5cab8) - syntax: fix code formatting [originally: complete: support auto-complete sources]
#D1938
450f70b (master: 00cae74) - main: use builtin for ":" [histdb: support timeout of background processes]
#D1971
482ddb5 (master: e0566bd) - global: normalize to
_a-zA-Z
[sabbrev: apply sabbrev to right-hand sides of variable assignments]#D2006
a101fe6 (master: 41faa49) - util (restore-vars): work around
set -u
[lib: addutil.bgproc
forble/util/bgproc
]#D2017
8787ca5 (master: 7803305) - util: update
ble/util/conditional-sync
[util.bgproc: increase frequency of bgproc termination check]#D2027
79fd13c (master: 8d623c1)
Test
- util (ble/util/s2bytes): clear locale cache
#D1881
45f3df3 (master: 2e1a7c1) - util (ble/util/s2c): work around intermediate mbstate of bash <= 5.2
#D1881
45f3df3 (master: 2e1a7c1) - util (ble/encoding:UTF-8/b2c): fix interpretation of leading byte
#D1881
45f3df3 (master: 2e1a7c1) - complete: fix syntax error for bash-3.0
#D1881
b534799 (master: 0b3e611)
Documentation
- blerc: rename from
blerc
toblerc.template
#D1899
3c4e3a4 (master: e19b796) - wiki/Q&A: add item for defining a widget calling multiple widgets (motivated by micimize)
#D1898
3c4e3a4 (master: e19b796) - blerc: add frequently used keybindings (motivated by KiaraGrouwstra, micimize)
#D1896
#D1897
3c4e3a4 (master: e19b796)
Contrib
- fzf-key-bindings: fix a problem that
modifyOtherKeys
is not reflected (reported by SuperSandro2000)#D1908
f3a8382 (master: 486564a)
New features
- canvas: update emoji database and support
bleopt emoji_version
(motivated by endorfina)#D1454
3f6c9b9 (master: d1f8c27) - syntax: support tilde expansions in parameter expansions
#D1513
e32914f (master: 0506df2) - prompt (
contrib/prompt-git
): support dirty checking#D1601
50a0094 (master: b2713d9) - util (
bleopt
,bind
): fix error message and exit status, respectively#D1640
29728b1 (master: b663cee) - edit: support bash-5.2 binding of
prior/next
tohistory-search-{for,back}ward
#D1661
a3a353e (master: d26a6e1) - util: suppress false warnings of
bind
inside non-interactive shells (reported by wukuan405)#D1823
82c9934 (master: 1e19a67) - auto-complete: cancel auto-complete for
magic-space
#D1913
05c0888 (master: 01b4f67) - complete: support ambiguous completion for command paths
#D1922
6d1e1ba (master: 8a716ad) - syntax: support context after
((...))
and[[ ... ]]
in bash-5.2#D1962
57d7674 (master: 67cb967)