Detail view
pls
can stat the nodes to derive more information, called metadata, about
them, which it can then present in a tabular format. This is called the detail
view.
Arguments
--det
/-d
can be used to select the detail columns the user wants to see, and
indirectly turn the detail view on or off. The detail view is considered to be
turned off if no detail field is chosen.
The --det
/-d
flag can be specified multiple times to enable multiple fields.
Each time it can take one of these values.
Value | Description | Standard |
---|---|---|
dev | device ID | |
ino | inode number | |
nlink | number of hard links | Yes |
typ | node type | Yes |
perm | symbolic permissions | Yes |
oct | octal permissions | |
user | owner user name | Yes |
uid | owner user ID | |
group | owner group name | Yes |
gid | owner group ID | |
size | storage space | Yes |
blocks | number of blocks | |
btime | created at; "b" for birth | |
ctime | changed at; originally meant "created at" | |
mtime | modified at | Yes |
atime | accessed at | |
git | Git status | |
none | shorthand: no details | |
std | shorthand: the standard set of details | |
all | shorthand: all details |
The column headers for the detail view can be toggled using the
--header
/-H
flag.
Mechanism
When parsing the --det
/-d
argument, values are read from the CLI, in order,
and added to a vector of fields till we encounter a shorthand value. If the
shorthand value is none
, the vector is cleared. The other two shorthands are
expanded and added to the vector.
std
can be used to show the fields shown byls(1)
with the-l
flagall
can be used to show every available metadata field
For example, consider the pls
invocation below.
dev
is added to the list.ino
is added to the list.- All entries so far are dropped when
none
is encountered. nlink
,typ
,perm
,user
,group
,size
andmtime
are added to the list whenstd
is encounteredgit
is added to the list.
The final set is thus nlink
, typ
, perm
, user
, group
, size
, mtime
and git
. Since this is more than zero, pls
will activate the detail view.
Examples
dir/ block_dev@
/dev/disk0 char_dev@ /dev/null fifo| file socket= sym@ ./dir
User Group Name runner docker dir/ runner docker block_dev@
/dev/disk0runner docker char_dev@ /dev/null runner docker fifo| runner docker file runner docker socket= runner docker sym@ ./dir
Link# T Permissions User Group Size Modified Name 2 d rwx r-x r-x runner docker 2025-Jan-23 10:38am dir/ 1 l rwx rwx rwx runner docker 10.0 B 2025-Jan-23 10:38am block_dev@
/dev/disk01 l rwx rwx rwx runner docker 9.0 B 2025-Jan-23 10:38am char_dev@ /dev/null 1 p rw- r-- r-- runner docker 0.0 B 2025-Jan-23 10:38am fifo| 1 f rw- r-- r-- runner docker 1.0 MiB 2025-Jan-23 10:38am file 1 s rwx r-x r-x runner docker 0.0 B 2025-Jan-23 10:38am socket= 1 l rwx rwx rwx runner docker 5.0 B 2025-Jan-23 10:38am sym@ ./dir
Device inode Link# T Permissions SUGO User UID Group GID Size Blocks Created Changed Modified Accessed Git Name 2065 533994 2 d rwx r-x r-x 755 runner 1001 docker 118 2025-Jan-23 10:38am 2025-Jan-23 10:38am 2025-Jan-23 10:38am dir/ 2065 534108 1 l rwx rwx rwx 777 runner 1001 docker 118 10.0 B 0 2025-Jan-23 10:38am 2025-Jan-23 10:38am 2025-Jan-23 10:38am block_dev@
/dev/disk02065 534086 1 l rwx rwx rwx 777 runner 1001 docker 118 9.0 B 0 2025-Jan-23 10:38am 2025-Jan-23 10:38am 2025-Jan-23 10:38am char_dev@ /dev/null 2065 534072 1 p rw- r-- r-- 644 runner 1001 docker 118 0.0 B 0 2025-Jan-23 10:38am 2025-Jan-23 10:38am 2025-Jan-23 10:38am fifo| 2065 534109 1 f rw- r-- r-- 644 runner 1001 docker 118 1.0 MiB 8 2025-Jan-23 10:38am 2025-Jan-23 10:38am 2025-Jan-23 10:38am file 2065 534083 1 s rwx r-x r-x 755 runner 1001 docker 118 0.0 B 0 2025-Jan-23 10:38am 2025-Jan-23 10:38am 2025-Jan-23 10:38am socket= 2065 534052 1 l rwx rwx rwx 777 runner 1001 docker 118 5.0 B 0 2025-Jan-23 10:38am 2025-Jan-23 10:38am 2025-Jan-23 10:38am sym@ ./dir
Configuration
Each of the detail fields is deeply customisable. Read on to know more the customisation options supported by each field.
Fields
dev
- Device ID
This field can by styled by specifying entry_const.dev_style
. pls
does not
style this field by default, because a style would not add any meaning.
ino
- Inode number
This field can by styled by specifying entry_const.ino_style
. pls
does not
style this field by default, because a style would not add any meaning.
nlink
- Number of hard links
This field can be styled different based on the type of the node and the number
of hard links the node has. pls
allows files with more than one hard link
and directories with only one hard link to be styled differently because these
are peculiar cases. The opposite scenario is more common.
Type | nlink | Style |
---|---|---|
file | 1 | entry_const.nlink_styles.file_sing |
file | >1 | entry_const.nlink_styles.file_plur |
dir | 1 | entry_const.nlink_styles.dir_sing |
dir | >1 | entry_const.nlink_styles.dir_plur |
typ
- Node type character
pls
allows you to completely change the type character to whatever makes you
think of the node's type.
Type | Character |
---|---|
Dir | entry_const.typ.dir.ch |
Symlink | entry_const.typ.symlink.ch |
FIFO | entry_const.typ.fifo.ch |
Socket | entry_const.typ.socket.ch |
Block device | entry_const.typ.block_device.ch |
Char device | entry_const.typ.char_device.ch |
File | entry_const.typ.file.ch |
Unknown | entry_const.typ.unknown.ch |
perm
- Symbolic permissions
This field can by styled by specifying entry_const.perm_style
. pls
allows
individual customisation of each of the permission characters for read (r
),
write (w
), execute (x
), special (s
/S
/t
/T
) and none (-
).
| Bit | Style | | ------- | entry_const | | Read |
entry_const.perm_styles.read
| | Write | entry_const.perm_styles.write
| |
Execute | entry_const.perm_styles.execute
| | Special |
entry_const.perm_styles.special
| | None | entry_const.perm_styles.none
|
oct
- Octal permissions
An octal permission has either three (user, group, other) or four (special, plus
the previous three) digits. pls
allows customisation of each of these digits
individually.
Digit | Style |
---|---|
Special | entry_const.oct_styles.special |
User | entry_const.oct_styles.user |
Group | entry_const.oct_styles.group |
Other | entry_const.oct_styles.other |
user
/uid
- Owner user name/UID
pls
styles the name or UID of the user that owns the node differently based
on whether the user is the current user or not. These styles apply identically
to the user name and the UID.
User | Style |
---|---|
Current | entry_const.user_styles.curr |
Other | entry_const.user_styles.other |
group
/gid
- Owner group name/GID
pls
styles the name or GID of the group that owns the node differently based
on whether the current user belongs to the group or not. These styles apply
identically to the group name and the GID.
Group | Style |
---|---|
Current | entry_const.group_styles.curr |
Other | entry_const.group_styles.other |
size
- Storage space
pls
shows the size of the node in human readable format by default, while
allowing the user to choose between three unit systems. See
units for more information about unit systems.
You can style the three components of a size value independently. Ideally, you want to emphasise magnitude and prefix and de-emphasise the base (which is always "B" for bytes).
Component | Style |
---|---|
Magnitude | entry_const.size_styles.mag |
Prefix | entry_const.size_styles.prefix |
Base unit | entry_const.size_styles.base |
blocks
- Storage blocks
pls
shows the total number of physical blocks of size 512 bytes actually
allocated on the disk for the node. This can be more than what the actual size
on disk indicates if the node has "holes".
This field can by styled by specifying entry_const.blocks_style
. pls
does
not style this field by default, because a style would not add any meaning.
btime
/ctime
/mtime
/atime
- Timestamps
pls
can display the four common timestamps of a file. pls
allows you to
choose the exact format in which you prefer the timestamps to be.
Timestamp | Format |
---|---|
Created at | entry_const.timestamp_formats.btime |
Changed at | entry_const.timestamp_formats.ctime |
Modified at | entry_const.timestamp_formats.mtime |
Accessed at | entry_const.timestamp_formats.atime |
The timestamp can use components from the time
crate's
format description
freely mixed with markup tags.
git
- Git status
🚧 This feature is a work in progress and will be coming in a future version.
Examples
Here is a custom config that approximately matches the output of
eza or exa at least for the
columns that they have in common with pls
(pls
has more, in case you
were wondering).
Device inode Links T Permissions Octal User UID Group GID Size Blocks Date Created Date Changed Date Modified Date Accessed Git Name 2065 533994 2 d rwx r-x r-x 755 runner 1001 docker 118 23 Jan 10:38 23 Jan 10:38 23 Jan 10:38 dir/ 2065 534108 1 l rwx rwx rwx 777 runner 1001 docker 118 10.0 0 23 Jan 10:38 23 Jan 10:38 23 Jan 10:38 block_dev@
/dev/disk02065 534086 1 l rwx rwx rwx 777 runner 1001 docker 118 9.0 0 23 Jan 10:38 23 Jan 10:38 23 Jan 10:38 char_dev@ /dev/null 2065 534072 1 | rw- r-- r-- 644 runner 1001 docker 118 0.0 0 23 Jan 10:38 23 Jan 10:38 23 Jan 10:38 fifo| 2065 534109 1 . rw- r-- r-- 644 runner 1001 docker 118 1.0 Mi 8 23 Jan 10:38 23 Jan 10:38 23 Jan 10:38 file 2065 534129 1 . rw- r-- r-- 644 runner 1001 docker 118 1.6 Ki 8 23 Jan 10:38 23 Jan 10:38 23 Jan 10:38 .pls.yml 2065 534083 1 s rwx r-x r-x 755 runner 1001 docker 118 0.0 0 23 Jan 10:38 23 Jan 10:38 23 Jan 10:38 socket= 2065 534052 1 l rwx rwx rwx 777 runner 1001 docker 118 5.0 0 23 Jan 10:38 23 Jan 10:38 23 Jan 10:38 sym@ ./dir