Commit Graph
21 Commits
Author SHA1 Message Date
Luca Di Maio 4acf784a7d feat(completion): add bash and zsh shell completion
Wrappers in completions/ call --generate-shell-completion; a Go
ShellComplete callback emits flag names so urfave's default response
(subcommands only) is replaced with the full candidate set.

This replaces old hard-coded way to auto-complete using shell script's
parsing.

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2026-06-25 13:39:47 +02:00
Emanuele De Cupis 5a9649e6ee chore(repo): make the go rewrite the root project (#60)
* chore(repo): remove shell implementation

* chore(repo): remove bash completion for sub-commands

There is no need for separate files as there will be no dedicated binary
for sub-commands

* chore(repo): remove zsh completion for sub-commands

There is no need for separate files as there will be no dedicated binary
for sub-commands

* chore(repo): delete RFC

We are not using RFC at the moment

* chore(repo): move golang project to the root

* chore(ci): move golang project to the root

* chore(repo): use standard .gitignore for golang projects

source: https://github.com/github/gitignore/blob/main/Go.gitignore

* chore(ci): compatibility CI to handle a golang project

* refactor(ci): run shell script checks against the inside-distrobox files

* refactor(ci): merge ci.yml workflow into main.yml
2026-06-14 13:04:28 +02:00
Yedaya Katsman 3acf01475e feat: set compopt filenames for --file in bash completion (#1916)
Currently it treats directories as filenames, so it puts a space after
them, forcing you to replace the space with a slash to get completions
in it.
2025-11-23 16:34:53 +01:00
Pedro Rabello Sato 8b79faf083 feat: bash completion enhancements (#1848)
* completion/bash: remove autocomplete of "version" and "help" subcommands

Before this change, "distrobox version" and distrobox "help" would
autocomplete with container names. Now it does not autocomplete as
those commands don't accept any parameter.

* completion/bash: complete "--home" option with absolute path

Before this change, "distrobox create --home" would expand
to "distrobox create --home myDir" which the distrobox command would
fail because the "home" option expects a absolute path. Now it would
expand the path with "/home/myUser/myDir"
2025-10-05 11:26:55 +02:00
Fredrico Calamari 5019b28226 zsh completions reworked. fixed not completing container names. (#1603) 2025-01-19 10:07:18 +01:00
Fredrico Calamari 00c19cb83f completions: zsh - fixed issue with some arguments having invalid syntax (#1216) 2024-02-19 18:05:24 +01:00
Pavin Joseph 93ff75e3ea init: improve systemd user integrations (#1211)
* Fix auth cookie symlink in init containers

* fix bash completions

* improve bash autocompletion

fix autocompletion of distrobox main command options and commands that include hyphen.

* Fix user integrations from not working after exit

Prevnt systemd from cleaning up the important user integration files when exiting a session and no other active sessions for that user are present.

* Fix enable linger permission issue

Perform this as root outside of the systemd user integration service file as it's run within the user slice and does not have the permission to enable linger.
2024-02-16 17:18:27 +01:00
Luca Di Maio 5201a2d2e5 install: fix completions installation
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2024-02-15 18:01:38 +01:00
Fredrico Calamari a60c37aff2 Added zsh completions (#1204) 2024-02-15 17:54:44 +01:00
Luca Di Maio 232d0a21bb completions: fix dependency to awk
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2023-10-29 18:26:37 +01:00
Luca Di Maio 0f8568dd23 completion: remove output from command test
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2023-06-10 12:43:34 +02:00
Luca Di Maio 1a93e55cc2 assemble: fix flag name
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2023-06-10 11:30:12 +02:00
Felix NiederwangerandLuca Di Maio 1250503ef3 ls: add distrobox ls alias to list (#734)
* Add distrobox ls

Adds the `distrobox ls` command, as a shortcut for `distrobox list`.

* ls: fix completion

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>

---------

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
Co-authored-by: Luca Di Maio <luca.dimaio1@gmail.com>
2023-06-10 11:12:02 +02:00
Luca Di Maio 1e554d7c55 completions: add assemble completion
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2023-05-02 23:15:09 +02:00
Luca Di Maio f9350130e5 completion: add assembly
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2023-04-26 08:48:01 +02:00
Luca Di Maio b8d634321a create: add compatibility list flag and image name autocompletion
Let's add a `--compatibility` flag, in order to return the list of
compatible container images to use. This method does not depend on `man`
to work.
Using this, we can now also use it as source to suggest image names
during creation.

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2022-11-01 17:53:10 +01:00
Michel Alexandre Salim e1d9803bc0 completions: remove shebangs from bash completions (#431)
These files start with the #! sequence that marks interpreted scripts, but they are bash completion scripts that is merely intended to be sourced.

See https://lintian.debian.org/tags/bash-completion-with-hashbang

Signed-off-by: Michel Alexandre Salim <michel@michel-slm.name>
2022-09-22 11:35:39 +02:00
Luca Di Maio 1b79cc848c completion: fix container name suggestion
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2022-09-15 11:16:30 +01:00
Luca Di Maio 7cad74d72e completions: formatting
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2022-09-12 09:54:27 +02:00
Luca Di Maio 2d3adcacb3 completions: fix sourcing of main completion script
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2022-09-12 09:44:52 +02:00
Luca Di Maio c9be6e2eb7 all: add bash autocompletion. Fix #328
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
2022-09-12 08:49:30 +02:00