-
-
Notifications
You must be signed in to change notification settings - Fork 163
Running ble.sh With Oil
andychu edited this page Jul 17, 2024
·
17 revisions
Related: How Interactive Shells Work
This is issue #653, in particular the list of tasks in this comment.
- Zulip 49. BUG \return 0 doesn't work
- Zulip 51. BUG option -i in declare -i v=1+2+3+4 is silently ignored
-
bind -x
to get user input. Can we do something simpler/better at first? - #647 NYI:
declare -p
, etc.-
declare
,declare -p
(#671) -
declare -f
,type function
★ -
trap
,trap -p
-
- #653 16. NYI:
read -t timeout
/builtin sleep
#684 - #680
trap -l
- #653 19. NYI: let (#622)
- #653 28. NYI:
declare -iluc
and flagsiluc
in${var@a}
- #653 32. NYI:
LC_CTYPE
(or Binary manipulations) (#527 and #529) - #1069 39. NYI: EPOCHREALTIME, SECONDS, and other dynamic variables
- #1069 40. BUG: a=(declare v); "${a[@]}" fails
- Zulip 45. NYI sparse array
- #652 CONSISTENCY: Check
declare -A d=([k]=v)
- #654 DOC: redefinable builtins?
- #653 22. COMPAT:
builtin declare
doesn't work (#654) - #653 24. COMPAT/ERRMSG: Oil tries to execute the first path in PATH for an empty command (#690)
- #653 35. COMPAT: Oil session closed by
exec non-existent-command
≦ 2024
- #653 29. BUG: Cannot parse
${arr[@]::}
- #1069 38. Regression
${var@a}
with compat_array (Fix9559c8ad
) - #1069 41. BUG:
[[ -c /dev/null ]]
fails in C++ version (fix #1618) - #1069 42. BUG:
osh -c 'read -d :'
fails in the C++ osh (not in the Python osh) (Fix #1629) - #1069 43. BUG:
shopt -u expand_aliases
fails in scripts sourced with arguments (Fix #1628) - Zulip 46. BUG(c++) ((1<<32)) fails (Fix
c84c4054
) - Zulip 47. BUG(c++) printf %d $((1<<31)) fails (Fix
c26d3202
) - Zulip 48. BUG osh -c 'echo $((arr[0]))' fails (Fix
435acd16
) - Zulip 50. BUG local in eval doesn't work (Fix
c3eee5fd
)
0.8.pre5
- #653 30. BUG:
${arr[@]::0}
prints all the elements - #653 33. BUG: Redirection of 2 is persistent after
: 2>/dev/null >&30
(Fix #723) - #653 37. BUG:
{fd}>&-
does not close the fd (Fix #723) - #724 BUG: Digits in
$((base#num))
are reversed - #726 BUG:
${#BASH_SOURCE}
and${BASH_SOURCE:offset:length}
count array elements. - #729 BUG: Result of
IFS= read -n 1 char
disappears - #731 BUG:
declare -a arr
removes existing arrays
Before 0.8.pre5
- #620 NYI:
return 2>/dev/null
- #637 CONSISTENCY:
type return
- #537 NYI:
test -k
(#649) - #640 NYI:
((${prefix}a=${prefix}b))
(cf #644 #670) ★★ - #651 NYI:
unset -v 'a[0]'
★★ - #653 1. CONSISTENCY: default
[[ -o emacs ]]
in interactive sessions ★-
#659set +o emacs
-
- #653 2. NYI:
$FUNCNAME
/$BASH_LINENO
(#656) - #653 3. BUG:
${*:offset}
(#658) - #653 4. BUG:
${!prefix@}
self-rewrites (#657) - #653 5. CONSISTENCY:
declare -A dict=()
(#661) ★★ - #653 6. NYI:
exec 5<> a.pipe
(cf #223 #667 #672) - #653 7. NYI:
exec {fd}> a.txt
(cf #223 #672) - #653 8. NYI:
exec 5>&-
(cf #223 #667 #672) - #653 9. NYI:
read -d ''
(#356 #665) ★ - #653 10. ERRMSG:
builtin read
- #653 11. NYI:
trap -- ...
/eval -- ...
(#662) ★★ - #653 12. NYI:
printf '%()T'
(cf #650 #668) - #653 13. BUG:
${var=x}
- #653 14. DOC: Bash/Oil diff
- #653 15. NEWFEAT:
OIL_VERSION
/OIL_VERSINFO
? #683 - #653 17. BUG:
${arr[0]=x}
(#660) ★ - #653 18. BUG? An empty variable in recursive arithmetic evaluation produces fatal error (e379b61)
- #653 20. BUG
${!prefix@}
fails when prefix matches with an array name (daab1d6) - #653 21. BUG
${x/^}
crashes (dbf9e00) - #653 23. BUG:
declare -F
funcname doesn't accept non-alphanumeric characters in funcname ★★ (ec62c8a) - #653 25. NYI: Attributes
${var@a}
(#689) - #653 27. NYI: flags
rx
in${var@a}
(14548dc) - #653 36. BUG:
read
fails on empty lines (#705) ★★
Currently, ble.sh does not fully work on Oil. Only a part can be run for testing purpose.
$ git clone --recursive http://github.com/akinomyoga/ble.sh -b osh ble.osh
$ cd ble.osh
$ make
The branch osh
is occasionally force-pushed so need to be forcibly updated by git reset --hard
or git checkout -B
. Please be careful not to have your own commits in osh
branch or edits in the working tree before running the following commands. They will be lost. You need to save your changes in another branch.
$ cd ble.osh
$ git fetch origin
$ git checkout -B osh origin/osh
$ make
$ cd ble.osh
$ osh --rcfile oshrc.test-util
The builtin read -e
(read with line editor) is emulated by ble.sh
. Minimal initialization for testing read -e
is available with oshrc.read
in osh
branch of ble.sh
.
$ cd ble.osh
$ osh --rcfile oshrc.read
$ read -e
Specify prompt (-p
) and initial contents (-i
):
$ read -e -p '[\u@\h \W]\$ ' -i 'echo hello'