Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added completions for kw #877

Merged
merged 24 commits into from
Jun 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
56af28e
init: created readme.md
OJarrisonn Jun 4, 2024
89f1fcf
feat: add kw completions for kw init subcommand
OJarrisonn Jun 4, 2024
48996fa
Merge branch 'kw-init' into kw
OJarrisonn Jun 4, 2024
00f0d49
add completions to kw deploy
laisnuto Jun 4, 2024
675bad8
feat: kw build completions
OJarrisonn Jun 4, 2024
d6c36d1
Merge branch 'kw-build' into kw
OJarrisonn Jun 4, 2024
84a8867
feat: kw diff completions
OJarrisonn Jun 4, 2024
07e7e43
Merge branch 'kw-diff' into kw
OJarrisonn Jun 4, 2024
5f00f5a
feat: kw ssh completions
OJarrisonn Jun 5, 2024
e538e8e
Merge branch 'completions/kw-ssh' into kw
OJarrisonn Jun 5, 2024
62220a5
feat: completions for help and info related commands
OJarrisonn Jun 5, 2024
fecf2e5
Merge branch 'completions/kw-help' into kw
OJarrisonn Jun 5, 2024
a2931ad
feat: completions for kw: codestyle, self-update, kernel-config-manager
OJarrisonn Jun 5, 2024
5e64d2a
feat: completions for kw config
OJarrisonn Jun 5, 2024
7e41755
feat: add completions for kw remote
OJarrisonn Jun 6, 2024
fc7463b
Merge branch 'completions/kw-remote' into kw
OJarrisonn Jun 11, 2024
83bb2d5
feat: add completions for kw explore
OJarrisonn Jun 11, 2024
97e2ad3
feat: add completions for kw pomodoro
OJarrisonn Jun 11, 2024
c611085
feat: add completions for report
OJarrisonn Jun 11, 2024
dc83dd4
feat: add completions for kw device
OJarrisonn Jun 11, 2024
0722d1b
finish kw completions
laisnuto Jun 11, 2024
e7c57a6
feat: add missing flags to `kw debug`
OJarrisonn Jun 12, 2024
92468f7
delete unecessary nu-complete extern
laisnuto Jun 13, 2024
ad70d3b
feat: add --help to `kw remote`
OJarrisonn Jun 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: completions for help and info related commands
  • Loading branch information
OJarrisonn committed Jun 5, 2024
commit 62220a5bc1563a1b4559e85e719cc15cd1508676
49 changes: 49 additions & 0 deletions custom-completions/kw/kw-completions.nu
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
def "nu-complete kw subcommands" [] {
[
[value description];
["init" "Initialize kworkflow config file"]
["build" "Build kernel"]
["deploy" "Deploy a new kernel image to a target machine"]
["bd" "Build and install kernel image/modules"]
["diff" "Diff files"]
["ssh" "SSH support"]
["codestyle" "Apply checkpatch on directory or file"]
["self-update" "kw self-update mechanism"]
["maintainers" "Get maintainers and mailing list"]
["kernel-config-manager" "Manage kernel .config files"]
["config" "Set kw config options"]
["remote" "Manage machines available via ssh"]
["explore" "Explore string patterns"]
["pomodoro" "kw pomodoro support"]
["report" "Show kw pomodoro reports and kw usage statistics"]
["device" "Show basic hardware information"]
["backup" "Save or restore kw data"]
["debug" "Linux kernel debug utilities"]
["mail" "Send patches via email"]
["env" "Handle kw envs"]
["patch-hub" "Interface to lore kernel"]
["clear-cache" "Clear files generated by kw"]
["drm" "Set of commands to work with DRM drivers"]
["vm" "Basic support for QEMU image"]
["version" "Show kw version"]
["man" "Show manual pages"]
["h" "Displays this help message"]
["help" "Show kw man page"]
]
}

def "nu-complete kw man pages" [] {
nu-complete kw subcommands | where value != "bd" and value != "h" and value != "help" and value != "man"
}

def "nu-complete kw warnings" [] {
[
[value description];
Expand Down Expand Up @@ -40,10 +78,21 @@ def "nu-complete kw cores" [] {

# The inglorious kernel developer workflow tool
export extern "kw" [
subcommand?: string@"nu-complete kw subcommands" # Subcommand to run
--help(-h) # Shows help page
--version(-v) # Shows version
]

# Show kw manual pages
export extern "kw man" [
page?: string@"nu-complete kw man pages" # Manual page to show
]

# Show kw version
export extern "kw version" [
...args: string
]

# Initalize kworkflow config file
export extern "kw init" [
--template: string@"nu-complete kw init template" # Uses a template as the kworkflow.config
Expand Down