Skip to content

Importance

pls uses an importance system to both hide certain unimportant nodes as well as emphasize certain important ones.

Each node has a default importance of -1 if it starts with a leading dot, and 0 otherwise. This importance can be overridden using specs.

An importance scale maps importance levels to styling attributes. Any files with importance below the scale are hidden.

Arguments

--imp/-I can be used to set the baseline importance level. This affects the relative importance of all nodes. The default is 0. Setting a higher number will reduce the importance level of nodes and hide more of them.

At --imp=-2, a node with importance -2 behaves as it has an importance of 0, a node with importance -1 behaves as it has an importance of 1, and so on.

Examples

Terminal window
pls --imp=-2 # or -I=-2

dir/ 󰊢 .git/ .github/   fileREADME.mdsrc

 
Terminal window
pls --imp=-1 # or -I=-1

dir/ 󰊢 .git/ .github/ fileREADME.mdsrc

 
Terminal window
pls # or --imp=0 or -I=0

dir/ .github/   file  README.md src

 
Terminal window
pls --imp=1 # or -I=1

dir/ file README.md  src

 
Terminal window
pls --imp=2 # or -I=2

​ README.md src

 
Terminal window
pls --imp=2 file # `--imp` has no effect

file

 

Configuration

Using the configuration system, you can extend the importance scale to higher or lower levels and change the default styles applicable at each level.

.pls.yml
app_const:
imp_styles:
- [-2, "red"]
- [-1, "yellow"]
- [1, "green"]
- [2, "bright_magenta"]

dir/ 󰊢 .git/ .github/   file  .pls.yml README.md src