mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-09 09:49:09 +02:00
fix: allow config file to load showLineNumbers (#653)
This commit is contained in:
parent
e54618ef13
commit
bcd1296ce5
2 changed files with 5 additions and 0 deletions
|
|
@ -209,6 +209,10 @@ pager: true
|
|||
width: 80
|
||||
# show all files, including hidden and ignored.
|
||||
all: false
|
||||
# show line numbers (TUI-mode only)
|
||||
showLineNumbers: false
|
||||
# preserve newlines in the output
|
||||
preserveNewLines: false
|
||||
```
|
||||
|
||||
## Feedback
|
||||
|
|
|
|||
1
main.go
1
main.go
|
|
@ -170,6 +170,7 @@ func validateOptions(cmd *cobra.Command) error {
|
|||
tui = viper.GetBool("tui")
|
||||
showAllFiles = viper.GetBool("all")
|
||||
preserveNewLines = viper.GetBool("preserveNewLines")
|
||||
showLineNumbers = viper.GetBool("showLineNumbers")
|
||||
|
||||
if pager && tui {
|
||||
return errors.New("cannot use both pager and tui")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue