1
0
Fork 0
mirror of https://github.com/spf13/cobra synced 2025-04-26 16:47:19 +00:00
Commit graph

19 commits

Author SHA1 Message Date
Jack Wright
9f06afcca6
Merge ae37156f63 into ceb39aba25 2025-03-13 07:13:23 -05:00
Yedaya Katsman
f98cf4216d
Remove traling curlybrace () 2025-02-17 14:16:17 -05:00
Marc Khouzam
24ada7fe71
Remove the default "completion" cmd if it is alone ()
When a program has no sub-commands, its root command can accept
arguments.  If we add the default "completion" command to such programs
they will now have a sub-command and will no longer accept arguments.

What we do instead for this special case, is only add the "completion"
command if it is being called, or if it is being completed itself.

We want to have the "completion" command for such programs because it
will allow the completion of flags and of arguments (if provided
by the program).

Signed-off-by: Marc Khouzam <marc.khouzam@gmail.com>
2025-02-15 11:07:02 -07:00
ccoVeille
8cb30f9ca5
feat: add CompletionWithDesc helper ()
The code has also been refactored to use a type alias for completion and a completion helper

Using a type alias is a non-breaking change and it makes the code more readable and easier to understand.

Signed-off-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com>
Co-authored-by: Marc Khouzam <marc.khouzam@gmail.com>
2025-02-09 11:06:07 -05:00
Jack Wright
52185bed6e tweaking extra completion instructions 2024-12-08 19:44:45 -08:00
Jack Wright
d728bbb91e Nushell instructions tweak 2024-12-08 19:40:45 -08:00
Jack Wright
14e642ede9 fixed bad grammar mistake 2024-12-08 19:35:50 -08:00
Jack Wright
ddb39920b4 More documentation work for nushell 2024-12-01 18:44:56 -08:00
Jack Wright
2f80e0879f changed from being markdown, as I don't think the docs here are markdown 2024-11-30 15:01:06 -08:00
Jack Wright
18d7a29987 more documentation tweaks 2024-11-30 14:58:44 -08:00
Jack Wright
59726e2b0f fixed a typo 2024-11-30 14:06:56 -08:00
Jack Wright
7006719603 fixing formatting 2024-11-30 13:57:31 -08:00
Jack Wright
fa746d4d5a Incorporating pull request feedback
- Fixing completion on full paths
- Fixing completion with equals in flags
- Fixing fuzzy search
- Typos
2024-11-29 12:30:16 -08:00
Jack Wright
37ac7454fb Added a whitelist to add cobra apps to to prevent non-cobra apps from
being excuted
2024-11-29 12:30:16 -08:00
Jack Wright
1324e0c316 Added nushell to the Use: line 2024-11-29 12:30:16 -08:00
Jack Wright
594faef23f Changed the nushell completion implementation to be a nushell external completer 2024-11-29 12:30:16 -08:00
Jack Wright
a1431b2c57 'Completions for nushell' 2024-11-29 12:30:16 -08:00
Ville Skyttä
e63925d321
Add env variable to suppress completion descriptions on create ()
COBRA_COMPLETION_DESCRIPTIONS=0 
or 
<PROGRAM>_COMPLETION_DESCRIPTIONS=0
can now be used to disable shell completion descriptions.
2023-12-17 13:50:59 -05:00
Unai Martinez-Corral
dcb405a939
Move documentation sources to site/content () 2023-06-20 17:15:36 -04:00
Renamed from shell_completions.md (Browse further)