Skip to content

Commit afdc9ae

Browse files
authored
Merge pull request #172 from rsteube/add-firefox-chrome
added firefox and google-chrome
2 parents fc1b013 + 3bb5be4 commit afdc9ae

File tree

4 files changed

+95
-0
lines changed

4 files changed

+95
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
package cmd
2+
3+
import (
4+
"github.com/rsteube/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var rootCmd = &cobra.Command{
9+
Use: "firefox",
10+
Short: "",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func Execute() error {
15+
return rootCmd.Execute()
16+
}
17+
func init() {
18+
carapace.Gen(rootCmd).Standalone()
19+
20+
rootCmd.Flags().StringS("P", "P", "", "Start with <profile>.")
21+
rootCmd.Flags().Bool("ProfileManager", false, "Start with ProfileManager.")
22+
rootCmd.Flags().Bool("allow-downgrade", false, "Allows downgrading a profile.")
23+
rootCmd.Flags().Bool("browser", false, "Open a browser window.")
24+
rootCmd.Flags().Bool("devtools", false, "Open DevTools on initial load.")
25+
rootCmd.Flags().String("display", "", "X display to use")
26+
rootCmd.Flags().Bool("first-startup", false, "Run post-install actions before opening a new window.")
27+
rootCmd.Flags().Bool("full-version", false, "Print Firefox version, build and platform build ids.")
28+
rootCmd.Flags().Bool("headless", false, "Run without a GUI.")
29+
rootCmd.Flags().BoolP("help", "h", false, "Print this message.")
30+
rootCmd.Flags().Bool("jsconsole", false, "Open the Browser Console.")
31+
rootCmd.Flags().Bool("migration", false, "Start with migration wizard.")
32+
rootCmd.Flags().Bool("new-instance", false, "Open new instance, not a new window in running instance.")
33+
rootCmd.Flags().String("new-tab", "", "Open <url> in a new tab.")
34+
rootCmd.Flags().Bool("no-remote", false, "Do not accept or send remote commands")
35+
rootCmd.Flags().Bool("preferences", false, "Open Preferences dialog.")
36+
rootCmd.Flags().String("profile", "", "Start with profile at <path>.")
37+
rootCmd.Flags().Bool("safe-mode", false, "Disables extensions and themes for this session.")
38+
rootCmd.Flags().String("search", "", "Search <term> with your default search engine.")
39+
rootCmd.Flags().String("ssb", "", "Open a site specific browser for <uri>.")
40+
rootCmd.Flags().String("start-debugger-server", "", "Start the devtools server")
41+
rootCmd.Flags().Bool("sync", false, "Make X calls synchronous")
42+
rootCmd.Flags().BoolP("version", "v", false, "Print Firefox version.")
43+
44+
carapace.Gen(rootCmd).FlagCompletion(carapace.ActionMap{
45+
"profile": carapace.ActionFiles(""),
46+
})
47+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package main
2+
3+
import "github.com/rsteube/carapace-bin/completers/firefox_completer/cmd"
4+
5+
func main() {
6+
cmd.Execute()
7+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package cmd
2+
3+
import (
4+
"github.com/rsteube/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var rootCmd = &cobra.Command{
9+
Use: "google-chrome",
10+
Short: "",
11+
Run: func(cmd *cobra.Command, args []string) {},
12+
}
13+
14+
func Execute() error {
15+
return rootCmd.Execute()
16+
}
17+
func init() {
18+
carapace.Gen(rootCmd).Standalone()
19+
20+
rootCmd.Flags().String("app", "", "Runs URL in app mode")
21+
rootCmd.Flags().Bool("new-window", false, "If PATH or URL is given, open it in a new window.")
22+
rootCmd.Flags().Bool("no-proxy-server", false, "Disables the proxy server")
23+
rootCmd.Flags().String("password-store", "", "Set the password store to use")
24+
rootCmd.Flags().Bool("proxy-auto-detect", false, "Autodetect proxy configuration")
25+
rootCmd.Flags().String("proxy-pac-url", "", "Specify proxy autoconfiguration URL")
26+
rootCmd.Flags().String("proxy-server", "", "Specify the HTTP/SOCKS4/SOCKS5 proxy server to use for requests.")
27+
rootCmd.Flags().String("user-data-dir", "", "Specifies the directory that user data is kept in")
28+
rootCmd.Flags().Bool("version", false, "Show version information.")
29+
30+
carapace.Gen(rootCmd).FlagCompletion(carapace.ActionMap{
31+
"password-store": carapace.ActionValues("basic", "gnome", "kwallet"),
32+
"user-data-dir": carapace.ActionDirectories(),
33+
})
34+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package main
2+
3+
import "github.com/rsteube/carapace-bin/completers/google-chrome_completer/cmd"
4+
5+
func main() {
6+
cmd.Execute()
7+
}

0 commit comments

Comments
 (0)