diff --git a/file/command.go b/file/command.go index f60ed2965..7d02b6e3c 100644 --- a/file/command.go +++ b/file/command.go @@ -46,6 +46,8 @@ func (o Options) Run() error { FileAllowed(o.File). Height(o.Height). ShowHidden(o.All). + ShowSize(o.Size). + ShowPermissions(o.Permissions). Value(&path), ), ). @@ -53,7 +55,6 @@ func (o Options) Run() error { WithKeyMap(keymap). WithTheme(theme). Run() - if err != nil { return err } diff --git a/file/options.go b/file/options.go index 5d4593d52..072bd34aa 100644 --- a/file/options.go +++ b/file/options.go @@ -11,11 +11,13 @@ type Options struct { // Path is the path to the folder / directory to begin traversing. Path string `arg:"" optional:"" name:"path" help:"The path to the folder to begin traversing" env:"GUM_FILE_PATH"` // Cursor is the character to display in front of the current selected items. - Cursor string `short:"c" help:"The cursor character" default:">" env:"GUM_FILE_CURSOR"` - All bool `short:"a" help:"Show hidden and 'dot' files" default:"false" env:"GUM_FILE_ALL"` - File bool `help:"Allow files selection" default:"true" env:"GUM_FILE_FILE"` - Directory bool `help:"Allow directories selection" default:"false" env:"GUM_FILE_DIRECTORY"` - ShowHelp bool `help:"Show help key binds" negatable:"" default:"true" env:"GUM_FILE_SHOW_HELP"` + Cursor string `short:"c" help:"The cursor character" default:">" env:"GUM_FILE_CURSOR"` + All bool `short:"a" help:"Show hidden and 'dot' files" default:"false" env:"GUM_FILE_ALL"` + Permissions bool `short:"p" help:"Show file permissions" default:"true" negatable:"" env:"GUM_FILE_PERMISSION"` + Size bool `short:"s" help:"Show file size" default:"true" negatable:"" env:"GUM_FILE_SIZE"` + File bool `help:"Allow files selection" default:"true" env:"GUM_FILE_FILE"` + Directory bool `help:"Allow directories selection" default:"false" env:"GUM_FILE_DIRECTORY"` + ShowHelp bool `help:"Show help key binds" negatable:"" default:"true" env:"GUM_FILE_SHOW_HELP"` Height int `help:"Maximum number of files to display" default:"0" env:"GUM_FILE_HEIGHT"` CursorStyle style.Styles `embed:"" prefix:"cursor." help:"The cursor style" set:"defaultForeground=212" envprefix:"GUM_FILE_CURSOR_"`