Skip to content

Commit e34ff78

Browse files
author
longendu
committed
Merge branch 'master' of https://github.com/legendu-net/blog
2 parents d0baadb + 0839515 commit e34ff78

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Status: published
2+
Date: 2025-11-16 16:02:18
3+
Modified: 2025-11-16 23:44:57
4+
Author: Benjamin Du
5+
Slug: generating-completions-script-using-crazy-complete
6+
Title: Generating Completions Script Using crazy-complete
7+
Category: Computer Science
8+
Tags: Computer Science, programming, shell, bash, zsh, fish, completion, generator, generating
9+
10+
**Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!**
11+
12+
There are many tools for generating completion scripts for shell languages (bash, zsh, fish, etc),
13+
[crazy-complete](https://github.com/crazy-complete/crazy-complete)
14+
is one of the best among such tools.
15+
16+
```
17+
ldc -h | crazy-complete --input-type=help yaml /dev/stdin > ldc.yaml
18+
crazy-complete --input-type=yaml fish ldc.yaml > ldc.fish
19+
```
20+
21+
## References
22+
23+
- [crazy-complete @ GitHub](https://github.com/crazy-complete/crazy-complete)
24+

misc/content/2025/11/tips-on-the-fish-shell/tips-on-the-fish-shell.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Status: published
22
Date: 2025-11-11 18:13:06
3-
Modified: 2025-11-11 18:13:06
3+
Modified: 2025-11-16 14:45:10
44
Author: Benjamin Du
55
Slug: tips-on-the-fish-shell
66
Title: Tips on the Fish Shell
@@ -36,4 +36,15 @@ Please refer to
3636
[Interactive use](https://fishshell.com/docs/current/interactive.html)
3737
for a more comprehensive list of key bindings.
3838

39+
## Completions
40+
41+
1. The built-in fish function
42+
[fish_update_completions](https://fishshell.com/docs/current/cmds/fish_update_completions.html)
43+
updates completions using manual pages.
44+
45+
2. Instead of writing completion scripts manually,
46+
lots of tools support exporting completion scripts for bash, zsh, fish, etc.
47+
48+
3. [crazy-complete](https://github.com/crazy-complete/crazy-complete)
49+
helps generate completion scripts based on YAML defined completion rules.
3950

0 commit comments

Comments
 (0)