We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 44ee660 + 6394d12 commit 098d66aCopy full SHA for 098d66a
completers/cfdisk_completer/cmd/root.go
@@ -2,6 +2,7 @@ package cmd
2
3
import (
4
"github.com/rsteube/carapace"
5
+ "github.com/rsteube/carapace-bin/pkg/actions/fs"
6
"github.com/spf13/cobra"
7
)
8
@@ -32,6 +33,14 @@ func init() {
32
33
})
34
35
carapace.Gen(rootCmd).PositionalCompletion(
- carapace.ActionFiles(),
36
+ ActionBlockDevicesAndFiles(),
37
38
}
39
+
40
+func ActionBlockDevicesAndFiles() carapace.Action {
41
+ return carapace.ActionCallback(func(c carapace.Context) carapace.Action {
42
+ blockDevices := fs.ActionBlockDevices().Invoke(c)
43
+ files := carapace.ActionFiles().Invoke(c)
44
+ return blockDevices.Merge(files).ToA()
45
+ })
46
+}
0 commit comments