-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
861 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var crashReportCmd = &cobra.Command{ | ||
Use: "+crash-report", | ||
Short: "inspect and send crash report", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(crashReportCmd).Standalone() | ||
|
||
crashReportCmd.Flags().Bool("help", false, "show help") | ||
rootCmd.AddCommand(crashReportCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var helpCmd = &cobra.Command{ | ||
Use: "+help", | ||
Short: "show help", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(helpCmd).Standalone() | ||
|
||
rootCmd.AddCommand(helpCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var listActionsCmd = &cobra.Command{ | ||
Use: "+list-actions", | ||
Short: "list all the available keybind actions for Ghostty", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(listActionsCmd).Standalone() | ||
|
||
listActionsCmd.Flags().Bool("docs", false, "print out the documentation for each action") | ||
listActionsCmd.Flags().Bool("help", false, "show help") | ||
rootCmd.AddCommand(listActionsCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var listColorsCmd = &cobra.Command{ | ||
Use: "+list-colors", | ||
Short: "list all the named RGB colors in Ghostty", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(listColorsCmd).Standalone() | ||
|
||
listColorsCmd.Flags().Bool("help", false, "show help") | ||
rootCmd.AddCommand(listColorsCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/pkg/actions/os" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var listFontsCmd = &cobra.Command{ | ||
Use: "+list-fonts", | ||
Short: "list all the available fonts for Ghostty", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(listFontsCmd).Standalone() | ||
|
||
listFontsCmd.Flags().Bool("bold", false, "filter results to bold style") | ||
listFontsCmd.Flags().String("family", "", "filter results to a specific family") | ||
listFontsCmd.Flags().Bool("help", false, "show help") | ||
listFontsCmd.Flags().Bool("italic", false, "filter results to italic style") | ||
rootCmd.AddCommand(listFontsCmd) | ||
|
||
carapace.Gen(listFontsCmd).FlagCompletion(carapace.ActionMap{ | ||
"family": os.ActionFontFamilies(), | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var listKeybindsCmd = &cobra.Command{ | ||
Use: "+list-keybinds", | ||
Short: "list all the available keybinds", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(listKeybindsCmd).Standalone() | ||
|
||
listKeybindsCmd.Flags().Bool("default", false, "print out all the default keybinds") | ||
listKeybindsCmd.Flags().Bool("plain", false, "disable formatting") | ||
rootCmd.AddCommand(listKeybindsCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var listThemesCmd = &cobra.Command{ | ||
Use: "+list-themes", | ||
Short: "preview or list all the available themes for Ghostty", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(listThemesCmd).Standalone() | ||
|
||
listThemesCmd.Flags().Bool("help", false, "show help") | ||
listThemesCmd.Flags().Bool("path", false, "Show the full path to the theme") | ||
listThemesCmd.Flags().Bool("plain", false, "Force a plain listing of themes") | ||
rootCmd.AddCommand(listThemesCmd) | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var showConfigCmd = &cobra.Command{ | ||
Use: "+show-config", | ||
Short: "show the current configuration", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(showConfigCmd).Standalone() | ||
|
||
showConfigCmd.Flags().Bool("changes-only", false, "Only show the options that have been changed") | ||
showConfigCmd.Flags().Bool("default", false, "Show the default configuration") | ||
showConfigCmd.Flags().Bool("docs", false, "Print the documentation above each option as a comment") | ||
showConfigCmd.Flags().Bool("help", false, "show help") | ||
rootCmd.AddCommand(showConfigCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var showFaceCmd = &cobra.Command{ | ||
Use: "+show-face", | ||
Short: "show what font face Ghostty will use to render a specific codepoint", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(showFaceCmd).Standalone() | ||
|
||
showFaceCmd.Flags().String("cp", "", "Find the face for a single codepoint") | ||
showFaceCmd.Flags().Bool("help", false, "show help") | ||
showFaceCmd.Flags().String("presentation", "", "force searching for a specific presentation style") | ||
showFaceCmd.Flags().String("string", "", "Find the face for all of the codepoints in a string") | ||
showFaceCmd.Flags().String("style", "", "Search for a specific style") | ||
rootCmd.AddCommand(showFaceCmd) | ||
|
||
carapace.Gen(showFaceCmd).FlagCompletion(carapace.ActionMap{ | ||
"presentation": carapace.ActionValues("text", "emoji"), | ||
"style": carapace.ActionValues("regular", "bold", "italic", "bold_italic"), | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var validateConfigCmd = &cobra.Command{ | ||
Use: "+validate-config", | ||
Short: "validate a Ghostty config file", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(validateConfigCmd).Standalone() | ||
|
||
validateConfigCmd.Flags().String("config-file", "", "validate a specific target config file") | ||
validateConfigCmd.Flags().Bool("help", false, "show help") | ||
rootCmd.AddCommand(validateConfigCmd) | ||
|
||
carapace.Gen(validateConfigCmd).FlagCompletion(carapace.ActionMap{ | ||
"config-file": carapace.ActionFiles(), | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var versionCmd = &cobra.Command{ | ||
Use: "+version", | ||
Short: "show version", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(versionCmd).Standalone() | ||
|
||
rootCmd.AddCommand(versionCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package main | ||
|
||
import "github.com/carapace-sh/carapace-bin/completers/ghostty_completer/cmd" | ||
|
||
func main() { | ||
cmd.Execute() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package env | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/pkg/conditions" | ||
) | ||
|
||
func init() { | ||
knownVariables["ghostty"] = func() variables { | ||
return variables{ | ||
Condition: conditions.ConditionPath("ghostty"), | ||
Variables: map[string]string{ | ||
"GHOSTTY_RESOURCES_DIR": "resources directory", | ||
}, | ||
VariableCompletion: map[string]carapace.Action{ | ||
"GHOSTTY_RESOURCES_DIR": carapace.ActionDirectories(), | ||
}, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package ghostty | ||
|
||
import "github.com/carapace-sh/carapace" | ||
|
||
// ActionCursorStyles completes cursor styles | ||
// | ||
// block | ||
// bar | ||
func ActionCursorStyles() carapace.Action { | ||
return carapace.ActionValues( | ||
"block", | ||
"bar", | ||
"underline", | ||
"block_hollow", | ||
).Tag("cursor styles") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package ghostty | ||
|
||
import "github.com/carapace-sh/carapace" | ||
|
||
// ActionFontSyntheticStyles completes font synthetic styles | ||
// | ||
// false (completely disable) | ||
// italic (apply a slant to the glyph) | ||
func ActionFontSyntheticStyles() carapace.Action { | ||
return carapace.ActionValuesDescribed( | ||
"bold", "draw an outline around the glyph", | ||
"bold-italic", "draw an outline and apply a slant to the glyph", | ||
"false", "completely disable", | ||
"italic", "apply a slant to the glyph", | ||
"no-bold", "disable for bold", | ||
"no-bold-italic", "disable for bold-italic", | ||
"no-italic", "disable for italic", | ||
"true", "completely enable", | ||
) | ||
} | ||
|
||
// ActionFreetypeLoadFlags completes freetype load flags | ||
// | ||
// hinting (Enable hinting) | ||
// force-autohint (Use the freetype auto-hinter) | ||
func ActionFreetypeLoadFlags() carapace.Action { | ||
return carapace.ActionValuesDescribed( | ||
"hinting", "Enable hinting", | ||
"force-autohint", "Use the freetype auto-hinter", | ||
"monochrome", "use 1-bit monochrome rendering", | ||
"autohint", "Use the freetype auto-hinter", | ||
"no-hinting", "Disable hinting", | ||
"no-force-autohint", "Do not se the freetype auto-hinter", | ||
"no-monochrome", "Do not use 1-bit monochrome rendering", | ||
"no-autohint", "Do not use the freetype auto-hinter", | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package ghostty | ||
|
||
import "github.com/carapace-sh/carapace" | ||
|
||
// ActionGraphemeWidthMethods completes grapheme width methods | ||
// | ||
// legacy (Use a legacy method to determine grapheme width) | ||
// unicode (Use the Unicode standard to determine grapheme width) | ||
func ActionGraphemeWidthMethods() carapace.Action { | ||
return carapace.ActionValuesDescribed( | ||
"legacy", "Use a legacy method to determine grapheme width", | ||
"unicode", "Use the Unicode standard to determine grapheme width", | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package ghostty | ||
|
||
import "github.com/carapace-sh/carapace" | ||
|
||
// ActionMacIcons completes mac icons | ||
func ActionMacIcons() carapace.Action { | ||
return carapace.ActionValuesDescribed( | ||
"official", "Use the official Ghostty icon", | ||
"custom-style", "Use the official Ghostty icon but with custom styles", | ||
).Tag("mac icons") | ||
} | ||
|
||
// ActionMacIconFrames completes mac icon frames | ||
func ActionMacIconFrames() carapace.Action { | ||
return carapace.ActionValues( | ||
"aluminum", "A brushed aluminum frame. This is the default", | ||
"beige", "A classic 90's computer beige frame", | ||
"plastic", "A glossy, dark plastic frame", | ||
"chrome", "A shiny chrome frame", | ||
).Tag("mac icon frames") | ||
} | ||
|
||
// ActionMacFullscreenModes completes mac fullscreen modes | ||
func ActionMacFullscreenModes() carapace.Action { | ||
return carapace.ActionValuesDescribed( | ||
"visible-menu", "Use non-native macOS fullscreen, keep the menu bar visible", | ||
"true", "Use non-native macOS fullscreen, hide the menu bar", | ||
"false", "Use native macOS fullscreen", | ||
).Tag("mac fullscreen modes") | ||
} | ||
|
||
// ActionMacTitlebarStyles completes mac titlebar styles | ||
// | ||
// native (native macOS titlebar with zero customization) | ||
// transparent (same as "native" but the titlebar will be transparent) | ||
func ActionMacTitlebarStyles() carapace.Action { | ||
return carapace.ActionValuesDescribed( | ||
"native", "native macOS titlebar with zero customization", | ||
"transparent", "same as \"native\" but the titlebar will be transparent", | ||
"tabs", "custom titlebar that integrates the tab bar into the titlebar", | ||
"hidden", "hides the titlebar", | ||
).Tag("mac titlebar styles") | ||
} |
Oops, something went wrong.