8gears / do

The simplest build tool on earth. An all-purpose build tool and a build file all in one. It's trying to be better than the usual home-grown Shell hell.
Apache License 2.0
32 stars 5 forks source link

tab completion #3

Open mandric opened 10 months ago

mandric commented 10 months ago

Have you thought about adding tab completion here, so ./do.sh foo<tab><tab> would give you a list of functions that begin with "foo"?

Basically add some conventions so it behaves similar to awscli?

Vad1mo commented 10 months ago

Would make sense, open to accept PRs

mandric commented 10 months ago

Also are you trying to keep do.sh posix compliant? I noticed reference to sh in the shebang line and use of compgen which is bash specific or is that an accepted posix proposal? But I see no docs talking about posix. Would it be ok to use bash builtins for this? Do you want to have a fallback for posix shells?

Vad1mo commented 10 months ago

I am not trying to be fully POSIX compliant but rather KSH, so that do.sh can run on alpine or most commonly uses minimal shells.

As I remember, there are some Bash forks of this repo. Check them out.

mandric commented 9 months ago

WIP: https://github.com/mandric/do/pull/1

No completion code yet, starting with some tests.