plstree

display ls or ps output as directory or process trees
Log | Files | Refs | README

commit 15516064abc877fd1e3013db6a3d1a60b19aa062
parent 831aad5bc57de1c9fc9dba8b50c96db340d4cfcd
Author: Josuah Demangeon <mail@josuah.net>
Date:   Wed, 25 Apr 2018 11:14:57 +0200

unicode rules!

Diffstat:
Mlstree | 18+++++++++---------
Mpstree | 28++++++++++++++--------------
2 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/lstree b/lstree @@ -5,18 +5,18 @@ # Use find(1) walk the entire tree and then call ls -ld with all the # result (ls sort the list itself) with the paths displayed as a tree: # -# drwxr-xr-x 2 josuah josuah 512 Feb 16 13:19 |- .ssh -# -rw-r--r-- 1 josuah josuah 870 Feb 9 02:24 | `- config -# drwxr-xr-x 2 josuah josuah 1536 Feb 18 21:24 |- bin -# -rwxr-xr-x 1 josuah josuah 1351 Feb 18 22:30 | |- lt -# -rwxr-xr-x 1 josuah josuah 565 Feb 17 19:53 | |- mfilter -# -rwxr-xr-x 1 josuah josuah 5430 Feb 17 19:51 | `- xdg-open +# drwxr-xr-x 2 josuah josuah 512 Feb 16 13:19 ├─ .ssh +# -rw-r--r-- 1 josuah josuah 870 Feb 9 02:24 │ └─ config +# drwxr-xr-x 2 josuah josuah 1536 Feb 18 21:24 ├─ bin +# -rwxr-xr-x 1 josuah josuah 1351 Feb 18 22:30 │ ├─ lt +# -rwxr-xr-x 1 josuah josuah 565 Feb 17 19:53 │ ├─ mfilter +# -rwxr-xr-x 1 josuah josuah 5430 Feb 17 19:51 │ └─ xdg-open # -rwxr-xr-x 1 josuah josuah 468 Feb 17 19:55 ... BEGIN { - LINE = "| "; - NODE = "|- "; - TAIL = "`- "; + LINE = "│ "; + NODE = "├─ "; + TAIL = "└─ "; VOID = " "; num = list(entries, ARGC == 1 ? "." : ARGV[1]); diff --git a/pstree b/pstree @@ -7,22 +7,22 @@ # # USER TT NI PID STAT COMMAND # root ? 0 1 Ss runit -# josuah ? 0 22437 S |- startx -# josuah ? 0 22451 S | `- xinit -# root tty7 0 22452 Rsl+ | |- Xorg -# josuah ? 0 22457 S | `- dwm -# josuah ? 0 24882 S `- runsvdir -# josuah ? 0 24884 S |- runsv -# josuah ? 0 24887 S | |- svlogd -# josuah ? 0 24890 S | `- ratox -# josuah ? 0 24885 S `- runsv -# josuah ? 0 24405 S |- tor -# josuah ? 0 24889 S `- svlogd +# josuah ? 0 22437 S ├─ startx +# josuah ? 0 22451 S │ └─ xinit +# root tty7 0 22452 Rsl+ │ ├─ Xorg +# josuah ? 0 22457 S │ └─ dwm +# josuah ? 0 24882 S └─ runsvdir +# josuah ? 0 24884 S ├─ runsv +# josuah ? 0 24887 S │ ├─ svlogd +# josuah ? 0 24890 S │ └─ ratox +# josuah ? 0 24885 S └─ runsv +# josuah ? 0 24405 S ├─ tor +# josuah ? 0 24889 S └─ svlogd BEGIN { - LINE = "| "; - NODE = "|- "; - TAIL = "`- "; + LINE = "│ "; + NODE = "├─ "; + TAIL = "└─ "; VOID = " "; list(entries);