Skip to content
Myr

options.go

This file

Path

file/options.go

34 lines · 2.8 KiB · Go

Last changed by

chore: prepare v2 (#1116)Drew Smirnoffbefore adoption02d6f06

History of this file

Take it

The walk stopped after 200 commits: lines older than 6837ed2 point at it.

feat(deps): bump github.com/charmbracelet/bubbletea from 0.27.0 to 1.0.0 (#661)dependabot[bot]before adoption6837ed2

lines 1–5why, one step back
1package file
23import (4 "time"5

chore: prepare v2 (#1116)Drew Smirnoffbefore adoption02d6f06

line 6why, one step back
6 "charm.land/gum/v2/style"

feat(deps): bump github.com/charmbracelet/bubbletea from 0.27.0 to 1.0.0 (#661)dependabot[bot]before adoption6837ed2

lines 7–13why, one step back
7)
89// Options are the options for the file command.10type Options struct {11 // Path is the path to the folder / directory to begin traversing.12 Path string `arg:"" optional:"" name:"path" help:"The path to the folder to begin traversing" env:"GUM_FILE_PATH"`13 // Cursor is the character to display in front of the current selected items.

feat(file): add --header (#768)Carlos Alexandro Beckerbefore adoptionf921ebd

lines 14–23why, one step back
14 Cursor string `short:"c" help:"The cursor character" default:">" env:"GUM_FILE_CURSOR"`
15 All bool `short:"a" help:"Show hidden and 'dot' files" default:"false" env:"GUM_FILE_ALL"`16 Permissions bool `short:"p" help:"Show file permissions" default:"true" negatable:"" env:"GUM_FILE_PERMISSION"`17 Size bool `short:"s" help:"Show file size" default:"true" negatable:"" env:"GUM_FILE_SIZE"`18 File bool `help:"Allow files selection" default:"true" env:"GUM_FILE_FILE"`19 Directory bool `help:"Allow directories selection" default:"false" env:"GUM_FILE_DIRECTORY"`20 ShowHelp bool `help:"Show help key binds" negatable:"" default:"true" env:"GUM_FILE_SHOW_HELP"`21 Timeout time.Duration `help:"Timeout until command aborts without a selection" default:"0s" env:"GUM_FILE_TIMEOUT"`22 Header string `help:"Header value" default:"" env:"GUM_FILE_HEADER"`23 Height int `help:"Maximum number of files to display" default:"10" env:"GUM_FILE_HEIGHT"`

feat(deps): bump github.com/charmbracelet/bubbletea from 0.27.0 to 1.0.0 (#661)dependabot[bot]before adoption6837ed2

lines 24–29why, one step back
24
25 CursorStyle style.Styles `embed:"" prefix:"cursor." help:"The cursor style" set:"defaultForeground=212" envprefix:"GUM_FILE_CURSOR_"`26 SymlinkStyle style.Styles `embed:"" prefix:"symlink." help:"The style to use for symlinks" set:"defaultForeground=36" envprefix:"GUM_FILE_SYMLINK_"`27 DirectoryStyle style.Styles `embed:"" prefix:"directory." help:"The style to use for directories" set:"defaultForeground=99" envprefix:"GUM_FILE_DIRECTORY_"`28 FileStyle style.Styles `embed:"" prefix:"file." help:"The style to use for files" envprefix:"GUM_FILE_FILE_"`29 PermissionsStyle style.Styles `embed:"" prefix:"permissions." help:"The style to use for permissions" set:"defaultForeground=244" envprefix:"GUM_FILE_PERMISSIONS_"`

feat(file): add --header (#768)Carlos Alexandro Beckerbefore adoptionf921ebd

lines 30–32why, one step back
30 SelectedStyle style.Styles `embed:"" prefix:"selected." help:"The style to use for the selected item" set:"defaultBold=true" set:"defaultForeground=212" envprefix:"GUM_FILE_SELECTED_"` //nolint:staticcheck
31 FileSizeStyle style.Styles `embed:"" prefix:"file-size." help:"The style to use for file sizes" set:"defaultWidth=8" set:"defaultAlign=right" set:"defaultForeground=240" envprefix:"GUM_FILE_FILE_SIZE_"` //nolint:staticcheck32 HeaderStyle style.Styles `embed:"" prefix:"header." set:"defaultForeground=99" envprefix:"GUM_FILE_HEADER_"`

feat: adding --padding to most commands (#960)Carlos Alexandro Beckerbefore adoption6045525

line 33why, one step back
33 Padding string `help:"Padding" default:"${defaultPadding}" group:"Style Flags" env:"GUM_FILE_PADDING"`

feat(deps): bump github.com/charmbracelet/bubbletea from 0.27.0 to 1.0.0 (#661)dependabot[bot]before adoption6837ed2

line 34why, one step back
34}