devonfw / IDEasy

Tool to automate the setup and updates of a development environment for any project (Successor of devonfw-ide).
Apache License 2.0
11 stars 23 forks source link

Consider functions instead of alias #779

Open hohwille opened 2 days ago

hohwille commented 2 days ago

In IDEasy we currently define ide as an alias to sourcing a script. For auto-completion we also hook in via a sourced bash script (source $IDE_ROOT/_ide/completion). With #778 a new such command is to be added that also needs autocompletion.

An alternative could be to use bash functions instead:

IMHO this will simplify and increase flexibility for future extension (e.g. if we have more ideas like #778), since we only need to tweak .bashrc once and forever and newer releases of IDEasy can add new commands and completions all via functions. The first step with this story should be an analysis and PoC testing if this plan works well or there are some drawbacks of this idea. If all works as planned, we should implement it this way since it seems the superior design.

hohwille commented 2 days ago

For the record: I decided for High as priority since this is a refactoring that will impact existing installations on roll-out / upgrade. If this approach works out, it is better to have it soon before many projects and users will start installing and using IDEasy.