cmd: auto-complete args starting with a $
Get series with b4
b4 am 20181204105448.63b9af8c@bbrezillonVersions newest first
- v1 Latest0 of 2 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 2 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [U-Boot] [PATCH 0/2] cmd: auto-complete args starting with a $
Quoted 11 lines · On Tue, 04 Dec 2018 10:44:19 +0100 Wolfgang Denk <[email protected]> wrote:
Dear Boris,
Quoted 6 lines · In message <[email protected]> you wrote:
It's pretty common to pass arguments that start with a $ and are then expanded by the shell, and I'm this kind of lazy guy that hits tab all the time and expects the shell to suggest something appropriate. So here is a patchset adding support for ${} auto-completion and using the new helper from the mtd command.
You mean, this feature depends on MTD support? this is not goot.
Not at all, MTD is just the first user of this dollar_complete() helper. That's what I meant.
Quoted 3 lines
Also, you should make this feature configurable. Not everybody may want to use it or may have the memory available.
It already depends on CONFIG_AUTO_COMPLETE, and each command has to explicitly call the helper to support ${} auto-completion. Not that $ auto-completion only makes sense for some arguments, not all of them. It's the responsibility of the command itself to decide when it should be used.
Quoted 4 lines
Technically - should autocompletion not be prevented for escaped '$' characters, i. e. hitting TAB after a '\$' sequence should NOT expand?
It's already the case. The argument has to start with $ or ${ to be auto-completed.