Skip to content

Paths

First pls organises paths supplied as CLI arguments into groups of solo files and individual directories. Then it prints each group one by one.

Terminal window
pls README.md Cargo.toml Cargo.lock src docs

README.md  Cargo.toml  Cargo.lock src: args/   └─ args.rs config/   └─ config.rs enums/   └─ enums.rs ext/   └─ ext.rs fmt/   └─ fmt.rs gfx/   └─ gfx.rs models/   └─ models.rs output/   └─ output.rs traits/   └─ traits.rs utils/   └─ utils.rs exc.rs main.rs.pls.yml docs: node_modules/ public/ src/ 󰌞 astro.config.mjs 󰊢 .gitignore 󰜎 justfile  package.json   └─ pnpm-lock.yaml.pls.yml  tsconfig.json

Solo files

The solo files group consists of all files supplied individually. These files are collected into one group. Each of the files in this group comes with its own separate configuration derived from .pls.yml files.

The special thing here is that the group also has its own configuration determined from the common ancestor of all these files. This group-level configuration sets top-level options such as table headings, box-drawing characters and importance scales.

Consider the following filesystem tree:

file_group
├── .pls.yml
├── a
└── subdir
├── .pls.yml
└── b
.pls.yml
app_const:
table:
header_style: red bold underline
entry_const:
user_styles:
curr: green bold
other: green bold
specs:
- pattern: ^a$
style: red underline
Terminal window
pls a ./../file_group/./subdir/a

Link# T Permissions User Group Size Modified Name   1 f rw- r-- r-- runner docker 0.0 B 2024-Nov-06 09:01pm a   1 f rw- r-- r-- runner docker 0.0 B 2024-11-06 ./../file_group/./subdir/a

Note how both files retain their individual configurations for the row, but the table settings come from the outer .pls.yml file. Also note that the file names are shown exactly as they were passed on the command line.

By default, pls does not follow symlinks in the arguments provided to it. So a symlink to a directory will be treated as a file input and will not list the contents of the target directory.

Terminal window
pls sym

​󰌹 sym@ 󰁔 ./dir

Terminal window
pls ./dir

​ LICENSE  README.md