Skip to content

Commit

Permalink
pkill: runstates completion
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Apr 15, 2022
1 parent c3dc453 commit b5208b4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 4 additions & 2 deletions completers/pgrep_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ func init() {
"parent": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return os.ActionProcessIds().Invoke(c).Filter(c.Parts).ToA()
}),
"pidfile": carapace.ActionFiles(),
"runstates": os.ActionProcessStates(),
"pidfile": carapace.ActionFiles(),
"runstates": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return os.ActionProcessStates().Invoke(c).Filter(c.Parts).ToA()
}),
"session": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return os.ActionSessionIds().Invoke(c).Filter(c.Parts).ToA()
}),
Expand Down
6 changes: 4 additions & 2 deletions completers/pkill_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ func init() {
"nslist": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return carapace.ActionValues("ipc", "mnt", "net", "pid", "user", "uts").Invoke(c).Filter(c.Parts).ToA()
}),
"pidfile": carapace.ActionFiles(),
"runstates": os.ActionProcessStates(),
"pidfile": carapace.ActionFiles(),
"runstates": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return os.ActionProcessStates().Invoke(c).Filter(c.Parts).ToA()
}),
"session": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return os.ActionSessionIds().Invoke(c).Filter(c.Parts).ToA()
}),
Expand Down
6 changes: 4 additions & 2 deletions completers/pwait_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ func init() {
"parent": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return os.ActionProcessIds().Invoke(c).Filter(c.Parts).ToA()
}),
"pidfile": carapace.ActionFiles(),
"runstates": os.ActionProcessStates(),
"pidfile": carapace.ActionFiles(),
"runstates": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return os.ActionProcessStates().Invoke(c).Filter(c.Parts).ToA()
}),
"session": carapace.ActionMultiParts(",", func(c carapace.Context) carapace.Action {
return os.ActionSessionIds().Invoke(c).Filter(c.Parts).ToA()
}),
Expand Down

0 comments on commit b5208b4

Please sign in to comment.