You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# there's a lot of commands we expect Bash to have, but that it might not due to compilation quirks
5
+
# see https://github.com/tianon/docker-bash/pull/45
6
+
# and https://www.gnu.org/software/bash/manual/html_node/Optional-Features.html#:~:text=unless%20the%20operating%20system%20does%20not%20provide%20the%20necessary%20support
7
+
8
+
image="$1"
9
+
10
+
args=( --rm --interactive )
11
+
if [ -t 0 ] && [ -t 1 ];then
12
+
args+=( --tty )
13
+
fi
14
+
15
+
docker run "${args[@]}""$image" -Eeuo pipefail -xc '
16
+
# --enable-array-variables 😏
17
+
cmds=(
18
+
# --enable-alias
19
+
alias unalias
20
+
# --enable-command-timing
21
+
time
22
+
# --enable-cond-command
23
+
"[["
24
+
# --enable-directory-stack
25
+
pushd popd dirs
26
+
# --enable-disabled-builtins
27
+
builtin enable
28
+
# --enable-help-builtin
29
+
help
30
+
# --enable-history
31
+
fc history
32
+
# --enable-job-control
33
+
bg fg jobs kill wait disown suspend
34
+
# --enable-progcomp
35
+
complete
36
+
# --enable-select
37
+
select
38
+
)
39
+
if [ "${BASH_VERSINFO:-0}" -ge 4 ]; then
40
+
# Bash 3.0 does not support arr+=( ... ) and balks at this syntax even in an optional block 😂
0 commit comments