New
Patch 0.2.7
ble-0.2.7 (2023-04-03)
Usage
Prerequisites
Bash 3.0+ and basic POSIX utilities are required.
Download ble-0.2.7.tar.xz
https://github.com/akinomyoga/ble.sh/releases/download/v0.2.7/ble-0.2.7.tar.xz
# DOWNLOAD with wget
wget https://github.com/akinomyoga/ble.sh/releases/download/v0.2.7/ble-0.2.7.tar.xz
# DOWNLOAD with curl
curl -LO https://github.com/akinomyoga/ble.sh/releases/download/v0.2.7/ble-0.2.7.tar.xz
Trial & Install
# TRIAL
tar xJf ble-0.2.7.tar.xz
source ble-0.2.7/ble.sh
# INSTALL
tar xJf ble-0.2.7.tar.xz -C ~/.local/share/blesh
# Add the following line near the top of ~/.bashrc
[[ $- == *i* ]] && source ~/.local/share/blesh/ble.sh --noattach
# Add the following line at the end of ~/.bashrc
((_ble_bash)) && ble-attach
blesh-0.2 fixes
- global: fix
ble/{is- => util/is}function5e82ca7a - global: pick fixes and changes from ble-0.1 backports 013eb1cd
- complete: fix up 4df15e1e f02bd2a5
- bump 0.2.7 1118c803
Fixes
- edit: work around the wrong job information of Bash in trap handlers (reported by 3ximus)
#D1435#D1436795a647c (master: bc4735e0) - edit (sword): fix definition of
sword(shell words)#D14415e73cf6b (master: f9233889) - edit (
kill-forward-logical-line): fix a bug not deleting newline at the end of the line#D144303787a2d (master: 09cf7f14) - global: work around bash-4.2 bug of
declare -gA(reported by 0xC0ncord)#D1470a2ace444 (master: 8856a04f) - global: fix declaration of associative arrays for
ble-reload(reported by 0xC0ncord)#D1471533eba77 (master: 3cae6e4d) - util (
ble/util/msleep): fix hang in Cygwin by swithing from/dev/udp/0.0.0.0/80to/dev/zero#D145246992e79 (master: d4d718ab) - syntax: fix broken AST with
[[keyword#D14540482bf64 (master: 69658efc) - util (
ble/util/msleep): work around the bash-4.3 bug ofread -t(reported by 3ximus)#D1468#D1469fad78ea5 (master: 4ca9b2e2) - bind: work around broken
cmd_xmapafter switching the editing mode#D147897ca1171 (master: 8d354c1b) - edit: clear graphic rendition on newlines and external commands
#D1479759b96dd (master: 18bb2d5c) - canvas: fix a glitch that SGR at the end of command line is applied to new lines
#D1498a6ac1216 (master: 4bdfdbf8) - syntax: fix a bug that
eval() { :; },declare() { :; }are not treated as function definition#D1529a4cda9c3 (master: b4290958) - decode: fix a hang on attach failure by cache corruption
#D1531a4c13ab8 (master: 24ea3792) - benchmark (
ble-measure): fix a bug that the result is always 0 in Bash 3 and 4 (fixup 8eb493a9 (master: bbc2a904))#D1615a034c91 - main: work around
. ble.sh --{test,update,clear-cache}in intereactive sessions#D15558eb493a9 (master: bbc2a904) - main: fix reloading after ble-update (fixup 8eb493a9 (master: bbc2a904)) (fixed by oc1024)
#D15589372670 - main: fix exit status for
bash ble.sh --test(fixup 8eb493a9 (master: bbc2a904))#D1558641238a - main: work around sourcing
ble.shinside subshells#D15548eb493a9 (master: bbc2a904) - global: use a better workaround of bash-4.2
declare -gAby separating assignment#D15670b7de999 (master: 2408a207) - edit (brackated-paste): fix incomplete
CR => LFconversion (reported by alborotogarcia)#D1587ac738bb4 (master: 8d6da161) - highlight (
layer:region): fix blocked lower-layer changes without selection changes#D1596650140ff (master: 5ede3c69) - util: work around the Bash 3 bug of array assignments with
^Aand^?in Bash 3.2#D16140ed7f6dc (master: b9f76118) - benchmark (
ble-measure): fix a bug that the result is always 0 in Bash 3 and 4 (fixup bbc2a904)#D161528e8dfed (master: a034c91a) - decode, canvas, etc.: explicitly treat CSI arguments as decimal numbers (reported by GorrillaRibs)
#D1625c9e4198b (master: c6473b78) 2ea48d7 - edit: fix a bug that
command-helpdoesn't work#D1635b992bb5d (master: 0f6a0834) - canvas: update prompt trace on
char_width_modechange (reported by Barbarossa93)#D164256b77a83 (master: 68ee1112) - util (
ble/util/readfile): fix a bug of always exiting with 1 inbash <= 3.2(reported by laoshaw)#D16785b843bb6 (master: 61705bf6) - complete: do not generate keywords for quoted command names
#D16917211b1ec (master: 60d244fe) - complete: fix empty completions with
FIGNORE(reported by seanfarley)#D171190f388aa (master: 144ea5db) - main: fix the message of owner errors of cache directories (reported by zim0369)
#D1712d2bf86c1 (master: b547a41a) - syntax: fix uninitialized syntax-highlighting in bash-3.2
#D17316aa12c82 (master: e3f5bf74) - progcomp: retry completions on
$? == 124also for non-default completions (reported by SuperSandro2000)#D1759c641fb1b (master: 82b9c011) - util (
ble/util/import): work around filenames with bash special characters#D17637da5f048 (master: b27f7585) - edit: fix the restore failure of
PS1andPROMPT_COMMANDonble-detach#D178447dfdd94 (master: b9fdaabd) - history: work around possible dirty prefix
*in the history output#D1808cc14f59c (master: 64a740d7) - decode: fix the workaround for
set -ewith--prompt=attach#D1832958aae6b (master: 51113237) - main. util: fix problems of readlink etc. found by test in macOS (reported by aiotter)
#D18498f0acf3d (master: fa955c1a)#D1855a22e145 - global: quote
return $?#D18849e10b54b (master: 801d14af) - bind: fix M-C-@, C-x C-@, and M-C-x (
bash-4.2 -o emacs)#D1920342826f3 (master: a410b038) - keymap/vi (
operator:filter): do not append newline at the end of line#D19942a8e746f (master: bce20339) - keymap/vi (
expand-range-for-linewise-operator): fix the end point being not extended#D19942a8e746f (master: bce20339) - syntax: fix unrecognized asignment
echo arr[i]+=rhs[sabbrev: apply sabbrev to right-hand sides of variable assignments]#D20064ed4fd4f (master: 41faa494) - syntax: fix unrecognized variable assignment of the form
echo arr[i]+=rhs#D20074ed4fd4f (master: 41faa494)
Changes
- syntax: exclude
\ + LFat the word beginning from words (motivated by cmplstofB)#D14316044a485 (master: 67e62d64) - edit: change default behavior of C-w and M-w to operate on backward words
#D1448787ff57f (master: 47a3301a) - edit: the widgets
{kill,copy,delete}-region-ornow receives widgets as arguments#D10218f48aff1 (master: bbbd155f) - edit (
ble/builtin/read): cancel by C-d on an empty line#D1473551bde3a (master: ecb8888d) - syntax: change syntax context after
time ;and! ;for Bash 4.4#D14770b66cf4a (master: 46283706) - prompt: invalidate prompt and textarea on prompt setting changes
#D149254d310df (master: 1f559135) - prompt: adjust behavior of
LINENOand prompt sequence\#(reported by tycho-kirchner)#D15424b63b164 (master: 8b0257e2) - main: show notifications against debug versions of Bash
#D1612608ac2ad (master: 8f974aa1) - prompt: do not evaluate
PROMPT_COMMANDfor subprompts#D16545c0cfdef (master: 08e903e0) - main: suppress non-interactive warnings from manually sourced startup files (reported by andreclerigo)
#D16762587bb01 (master: 05255282) 88e2df5 - main: suppress non-interactive warnings from manually sourced startup files (reported by andreclerigo)
#D16760525528 5f638563 (master: 88e2df51) - util (
ble/util/buffer): hide cursor in rendering#D17584ecbbdc2 (master: e332dc5f) - edit (
ble-detach): prepend a space tostty saneforHISTIGNORE=' *'#D1796bd903716 (master: 26b532e7) - history: disable the history file when
HISTFILEis empty#D1836d97ca100 (master: 9549e831) - keymap/vi (
decompose-meta): translate S-a to A#D1988eaf66c7c (master: 600e845e) - term (
_ble_term_TERM): detect konsole#D1988eaf66c7c (master: 600e845e) ed53858 - complete (
source:argument): fallback to rhs completion also forname+=rhs#D20064ed4fd4f (master: 41faa494)
Compatibility
- highlight: fix a problem that the attribute of the last character is applied till EOL
#D139336f9d809 (master: 2ddb1ba2)#D1395ef09932 - highlight: fix a problem that the attribute of the last character is applied till EOL
#D13932ddb1ba#D13956bcb4053 (master: ef099326) - global: work around empty
vi_imapcache bytmux-resurrect#D1562d7130d55 (master: 560160b0) - main: work around
set -Bandset -k#D16283c97ae84 (master: a8607692) - cmap: add
st-specific escape sequences for cursor keys#D1633bf46e344 (master: acfb8790) - cmap: distinguish find/select from home/end for openSUSE
inputrc.keys(reported by cornfeedhobo)#D1648ad675556 (master: c4d28f40) - cmap: freeze the internal codes of find/select and kitty special keys
#D1674f41b8004 (master: fdfe62a4) - decode: work around the overwritten builtin
set(reported by eadmaster)#D168093ae08d0 (master: a6b4e2ca) - complete: work around the variable leaks by
virshcompletion fromlibvirt(reported by telometto)#D1682ee2ac075 (master: f985b9a4) - stty: do not remove keydefs for C-u, C-v, C-w, and C-? (reported by laoshaw)
#D1683c01487bf (master: 82f74f0a) - main: work around
XDG_RUNTIME_DIRof a different user bysu(reported by zim0369)#D1712e5501a31 (master: 8d370486) - main (
ble/util/readlink): work around non-standard or missingreadlink(motivated by peterzky)#D1720d785f5db (master: a41279ed) - global: work around the arithmetic syntax error of
10#in Bash-5.1#D17342b55aa16 (master: 7545ea31) - global: adjust implementations for Bash 5.2
patsub_replacement#D1738359a3891 (master: 4590997a) - main: check
/dev/ttyon startup (reported by andychu)#D174919fa0924 (master: 711c69f1) - global: work around
shopt -s compat42#D1754e7adfb34 (master: a75bb25a) - global: identify bash-4.2 bug that internal quoting of
${v/%$empty/"$rep"}remains#D1753e7adfb34 (master: a75bb25a) - prompt: fix a bug of
ble/prompt/printredundantly quoting$#D1752e7adfb34 (master: a75bb25a) - global: work around
compat42quoting of"${v/pat/"$rep"}"#D1751e7adfb34 (master: a75bb25a) - util: add identification of Windows Terminal
wt#D17584ecbbdc2 (master: e332dc5f) - global: work around bash-3.0 bug that single quotes remains for
"${v-$''}"#D1774fb607ad6 (master: 9b96578c) - main: resolve empty
HOSTNAME[addhistdb]#D19255812f2ef (master: 44d9e104) - main: warn empty
LANG[main: support an option--inputrc={diff,all,user,none}]#D19263f29bee3 (master: 92f20063) - main: never load
/etc/inputrcin openSUSE (motivated by Ultra980)#D19263f29bee3 (master: 92f20063) 0ceb0cb - main: show warning for empty locale (movivated by Ultra980)
#D19273f29bee3 (master: 92f20063) - term (
terminology): work around terminal glitches#D19462d4caa67 (master: 9a1b4f9f) - edit: always adjust the terminal states with
bind -x(reported by linwaytin)#D1983cdda7c44 (master: 5d14cf17) - syntax: suppress brace expansions in designated array initialization in Bash 5.3
#D198978dd47ee (master: 1e7b884d) - edit: restore
PS1while processingbind -x(reported by adoyle-h)#D2024c46f4230 (master: 2eadcd5b)
Optimization
- util (
ble/util/assign): work around subshell conflicts#D157859d6355c (master: 6e4bb126) - prompt: fix not properly set
$?in${PS1@P}evaluation (reported by nihilismus)#D164466fd10b7 (master: 521aff9b) - util (
ble/string#split): optimize#D18265b3fc89c (master: 7bb10a79) - debug: add
ble/debug/profiler(motivated by SuperSandro2000)#D1824f629698 11aa4ab 5b3fc89c (master: 7bb10a79) - global: avoid passing arbitrary strings through
awk -v var=value#D18274571695a (master: 82232de5)
Internal changes and fixes
- main: include hostname in local runtime directory
#D1444d19ab298 (master: 64948361) - global: fix status check for read timeout
#D14670bcc12c9 (master: e886883b) - util, etc: ensure each function to work with arbitrary
IFS#D1490#D14912fe60b64 (master: 5f9adfe8) - util: fix
ble/util/dense-array#fill-rangeb708ee29 (master: a46fdaf4) - util: fix leak variables
buff,trap,{x,y}{1,2}#D157236d151e2 (master: 5967d6ce) - make: add fallback Makefile for BSD make
#D18056498a5d3 (master: e5d8d00c) - util, decode, vi: fix leak variables
#D1933002dda7f (master: 8d5cab85) - syntax: fix code formatting [histdb: support auto-complete source
histdb-word]#D1938edd48d1c (master: 00cae745) - main: use builtin for
:[histdb: support timeout of background processes]#D19718640dc41 (master: e0566bdc) - global: normalize bracket expressions to
_a-zA-Z/_a-zA-Z0-9#D20064ed4fd4f (master: 41faa494) - util (restore-vars): work around
set -u[util.bgproc: separateble/util/bgprocfromhistdb]#D2017d60758ae (master: 7803305f)
Test
- util (ble/util/s2bytes): clear locale cache
#D188199e217d3 (master: 2e1a7c17) - util (ble/util/s2c): work around intermediate mbstate of bash <= 5.2
#D188199e217d3 (master: 2e1a7c17) - util (ble/encoding:UTF-8/b2c): fix interpretation of leading byte
#D188199e217d3 (master: 2e1a7c17)
New features
- syntax: support context after
((...))and[[ ... ]]in bash-5.2#D196274af9e60 (master: 67cb967a)