mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-01-30 12:32:22 -08:00
fix(font): remove --font
This commit is contained in:
parent
9b17c483a8
commit
c301864021
|
@ -9,8 +9,6 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
fontName string
|
|
||||||
|
|
||||||
// fontCmd can work with fonts
|
// fontCmd can work with fonts
|
||||||
fontCmd = &cobra.Command{
|
fontCmd = &cobra.Command{
|
||||||
Use: "font [install|configure]",
|
Use: "font [install|configure]",
|
||||||
|
@ -31,11 +29,11 @@ This command is used to install fonts and configure the font in your terminal.
|
||||||
}
|
}
|
||||||
switch args[0] {
|
switch args[0] {
|
||||||
case "install":
|
case "install":
|
||||||
if len(fontName) == 0 {
|
if len(args) == 1 {
|
||||||
font.Run()
|
font.Run()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
err := font.Install(fontName)
|
err := font.Install(args[1])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err.Error())
|
fmt.Println(err.Error())
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
@ -51,6 +49,5 @@ This command is used to install fonts and configure the font in your terminal.
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() { // nolint:gochecknoinits
|
func init() { // nolint:gochecknoinits
|
||||||
fontCmd.Flags().StringVarP(&fontName, "font", "f", "", "the font name to install")
|
|
||||||
rootCmd.AddCommand(fontCmd)
|
rootCmd.AddCommand(fontCmd)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue