@@ -10,6 +10,7 @@ pub struct Args {
1010 pub tree_format : bool ,
1111 pub table_format : bool ,
1212 pub grid_format : bool ,
13+ pub grid_ignore : bool ,
1314 pub sizemap_format : bool ,
1415 pub timeline_format : bool ,
1516 pub git_format : bool ,
@@ -36,6 +37,7 @@ pub struct Args {
3637 pub no_symlinks : bool ,
3738 pub no_dotfiles : bool ,
3839 pub dotfiles_only : bool ,
40+ pub permission_format : String ,
3941 pub command : Option < Command > ,
4042}
4143
@@ -116,6 +118,11 @@ impl Args {
116118 . long ( "grid" )
117119 . help ( "Use grid listing format (overrides config format)" ) ,
118120 )
121+ . arg (
122+ Arg :: with_name ( "grid-ignore" )
123+ . long ( "grid-ignore" )
124+ . help ( "Use grid view ignoring terminal width (Warning: output may extend beyond screen width)" ) ,
125+ )
119126 . arg (
120127 Arg :: with_name ( "sizemap" )
121128 . short ( 'S' )
@@ -268,6 +275,14 @@ impl Args {
268275 . long ( "dotfiles-only" )
269276 . help ( "Show only dot files and directories (those starting with a dot)" ) ,
270277 )
278+ . arg (
279+ Arg :: with_name ( "permission-format" )
280+ . long ( "permission-format" )
281+ . help ( "Format for displaying permissions (symbolic, octal, binary, verbose, compact)" )
282+ . takes_value ( true )
283+ . possible_values ( & [ "symbolic" , "octal" , "binary" , "verbose" , "compact" ] )
284+ . default_value ( & config. permission_format ) ,
285+ )
271286 . subcommand (
272287 SubCommand :: with_name ( "install" )
273288 . about ( "Install a plugin" )
@@ -440,6 +455,7 @@ impl Args {
440455 tree_format : config. default_format == "tree" ,
441456 table_format : config. default_format == "table" ,
442457 grid_format : config. default_format == "grid" ,
458+ grid_ignore : false ,
443459 sizemap_format : config. default_format == "sizemap" ,
444460 timeline_format : config. default_format == "timeline" ,
445461 git_format : config. default_format == "git" ,
@@ -466,6 +482,7 @@ impl Args {
466482 no_symlinks : false ,
467483 no_dotfiles : config. filter . no_dotfiles ,
468484 dotfiles_only : false ,
485+ permission_format : config. permission_format . clone ( ) ,
469486 command : Some ( Command :: Shortcut ( ShortcutAction :: Run (
470487 potential_shortcut. clone ( ) ,
471488 args[ 2 ..] . to_vec ( ) ,
@@ -592,6 +609,7 @@ impl Args {
592609 || ( !has_format_flag && config. default_format == "table" ) ,
593610 grid_format : matches. is_present ( "grid" )
594611 || ( !has_format_flag && config. default_format == "grid" ) ,
612+ grid_ignore : matches. is_present ( "grid-ignore" ) ,
595613 sizemap_format : matches. is_present ( "sizemap" )
596614 || ( !has_format_flag && config. default_format == "sizemap" ) ,
597615 timeline_format : matches. is_present ( "timeline" )
@@ -636,6 +654,10 @@ impl Args {
636654 no_symlinks : matches. is_present ( "no-symlinks" ) ,
637655 no_dotfiles : matches. is_present ( "no-dotfiles" ) || config. filter . no_dotfiles ,
638656 dotfiles_only : matches. is_present ( "dotfiles-only" ) ,
657+ permission_format : matches
658+ . value_of ( "permission-format" )
659+ . unwrap_or ( & config. permission_format )
660+ . to_string ( ) ,
639661 command,
640662 }
641663 }
0 commit comments