2024-10-11 23:27:07 +03:00
|
|
|
{ ... }:
|
|
|
|
{
|
|
|
|
text = ''
|
|
|
|
# Create/Attach to the box.
|
|
|
|
# Uses name `main` by default.
|
|
|
|
# Usage: da [BOX]
|
|
|
|
function da() {
|
|
|
|
local name="''${1}"
|
2024-04-06 03:03:58 +03:00
|
|
|
|
2024-10-11 23:27:07 +03:00
|
|
|
[[ "''${name}" = "" ]] && name="main"
|
|
|
|
# if [[ "''${name}" = "" ]]; then
|
|
|
|
# help da
|
|
|
|
# return 2
|
|
|
|
# fi
|
2024-04-06 03:03:58 +03:00
|
|
|
|
2024-10-11 23:27:07 +03:00
|
|
|
# --user 0 is required for rootless docker.
|
|
|
|
distrobox enter -a '--user=0' "''${name}"
|
|
|
|
}
|
|
|
|
'';
|
2024-04-06 03:03:58 +03:00
|
|
|
}
|