[REQUEST]: refactor and enhance current dfi completion using bash-completion "library" #332

Open
opened 2026-03-20 19:52:56 +00:00 by AaronFiore · 0 comments
Owner

Client (host)

  • Add dependency to finance image (archlinux) Dockerfile and client manifest

Container (finance (archlinux) image)

https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/src/branch/master/container/src/finance/completion.bash

  • Refactor dfi completion using bash-completion (i.e., remove direct access to COMP* and use what's available, etc.)
  • Add completion to existing dfi arguments that aren't completing (e.g., dfi profile/subprofile edit type= -> dfi profile/subprofile edit type=rules...)

Notes

The not-so-straightforward resolution to this issue hinges on the fact that the default delim for all dfi completion is the = character (which also exists in COMP_WORDBREAKS). One resolution can be found in c63826f867/completions-core/dd.bash

See also:

For consideration

https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/src/branch/master/client/src/docker/completion.bash

  • Add support to client (host) completion but keep backward compatibility, as this would otherwise break the "no more than 3 dependencies" approach to client-side dfi.
## Client (host) - [x] Add dependency to `finance` image (`archlinux`) Dockerfile and client manifest ## Container (`finance` (`archlinux`) image) https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/src/branch/master/container/src/finance/completion.bash - [ ] Refactor `dfi` completion using `bash-completion` (i.e., remove direct access to COMP* and use what's available, etc.) - [ ] Add completion to existing `dfi` arguments that aren't completing (e.g., `dfi profile/subprofile edit type=` -> `dfi profile/subprofile edit type=rules...`) ## Notes The not-so-straightforward resolution to this issue hinges on the fact that the default delim for all `dfi` completion is the `=` character (which also exists in `COMP_WORDBREAKS`). One resolution can be found in https://github.com/scop/bash-completion/blob/c63826f8678e7d1fd36cf188bf1ba2eccaf2552e/completions-core/dd.bash See also: - https://github.com/scop/bash-completion/tree/main/completions-core - https://github.com/scop/bash-completion/blob/c63826f8678e7d1fd36cf188bf1ba2eccaf2552e/bash_completion#L1105-L1132 - https://github.com/scop/bash-completion/blob/c63826f8678e7d1fd36cf188bf1ba2eccaf2552e/bash_completion#L1450-L1454 - https://github.com/scop/bash-completion/blob/c63826f8678e7d1fd36cf188bf1ba2eccaf2552e/bash_completion#L2964-L2968 ## For consideration https://gitea.evergreencrypto.co/EvergreenCrypto/docker-finance/src/branch/master/client/src/docker/completion.bash - [ ] Add support to client (host) completion but keep backward compatibility, as this would otherwise break the "no more than 3 dependencies" approach to client-side `dfi`.
AaronFiore added this to the v1.5.0 milestone 2026-03-20 19:52:56 +00:00
AaronFiore added the DependencyEnhancementLanguage/BashRefactor labels 2026-03-20 19:52:56 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: EvergreenCrypto/docker-finance#332