Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layout config-option: long #1080

Open
goyalyashpal opened this issue Aug 13, 2024 · 3 comments
Open

layout config-option: long #1080

goyalyashpal opened this issue Aug 13, 2024 · 3 comments

Comments

@goyalyashpal
Copy link

goyalyashpal commented Aug 13, 2024

not a bug, but a feature request...

$ #- os: 
$ inxi --system | tail -n1
  Desktop: Cinnamon v: 6.0.4 Distro: NixOS 24.05 (Uakari)

$ lsd --version
lsd 1.1.2

$ echo $TERM
xterm-256color

$ echo $LS_COLORS
...

Expected behavior

  • the layout config option has some value say "long" to specify long-listing i.e. equivalent to -l or --long cli flag.
  • documentation for blocks itself mentions this 😄

lsd/README.md

Lines 143 to 145 in 9b310da

# == Blocks ==
# This specifies the columns and their order when using the long and the tree
# layout.

Actual behavior

layout only accepts grid, tree, oneline and errors out at long value.

$ lsd
lsd: Configuration file /home/.../.config/lsd/config.yaml format error, layout: unknown variant `long`, expected one of `grid`, `tree`, `oneline` at line 4 column 9.

lsd: Configuration file /home/.../.config/lsd/config.yaml format error, layout: unknown variant `long`, expected one of `grid`, `tree`, `oneline` at line 4 column 9.

lsd: Configuration file /home/.../.config/lsd/config.yaml format error, layout: unknown variant `long`, expected one of `grid`, `tree`, `oneline` at line 4 column 9.

   <...LISTING-CONTENT...>

lsd/README.md

Lines 209 to 213 in 9b310da

# == Layout ==
# Which layout to use. "oneline" might be a bit confusing here and should be
# called "one-per-line". It might be changed in the future.
# Possible values: grid, tree, oneline
layout: grid

@goyalyashpal
Copy link
Author

goyalyashpal commented Aug 14, 2024

i just realised that it would require an option in CLI to enable the grid layout lol i.e. to override the long lyoft specified in the config.

@aaaaaadrian
Copy link

Adding a +1 on this.

My config file includes

# == Blocks ==
# This specifies the columns and their order when using the long and the tree
# layout.
# Possible values: permission, user, group, context, size, date, name, inode, links, git
blocks:
  - permission
  - user
  - group
  - size
  - date
  - name

# == Layout ==
# Which layout to use. "oneline" might be a bit confusing here and should be
# called "one-per-line". It might be changed in the future.
# Possible values: grid, tree, oneline
layout: tree

Which gives this

λ lsd
Found existing alias for "lsd". You should use: "ll"
📂  .
├── 📄  .gitignore
├── 📄  Dockerfile
├── 📄  index.php
├── 📄  README.md
└── 📄  style.css

Changed layout to grid and got this:

λ lsd
Found existing alias for "lsd". You should use: "ll"
📄  .gitignore  📄  Dockerfile  📄  index.php  📄  README.md  📄  style.css

Changed layout to oneline and got this

λ lsd
Found existing alias for "lsd". You should use: "ll"
     Name
📄  .gitignore
📄  Dockerfile
📄  index.php
📄  README.md
📄  style.css

@goyalyashpal
Copy link
Author

goyalyashpal commented Jan 8, 2025

Adding a +1 on this.

hi @aaaaaadrian ! please be sure to drop a thumbsup on the description. as that is used as a potentoal priority metric for issues by lots of projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants