dot

packages and services management
Log | Files | Refs | README

commit 95ffabc2640ce82578c5b450edaaa42d6b20af12
parent 7d6e00ddeeac5e6924ef80730da8eafbe0184345
Author: Josuah Demangeon <mail@josuah.net>
Date:   Tue, 26 Dec 2017 20:42:34 +0100

imporved .profile and pree output

Diffstat:
Mbin/pree | 18+++++++++++-------
Mdot/profile | 1+
2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/bin/pree b/bin/pree @@ -1,12 +1,16 @@ #!/bin/sh -# convert find(1)-style input to a tree(1)-style output +# print a directory tree with some stat infos LC_COLLATE=C -[ "$1" = -h ] && h=1 && shift || h=0 +case $# in (0) ;; (1) cd "$1" || exit 1 ;; (*) exit 1 ;; esac -find "$@" -exec stat -f %N%t%Sp {} + | sort -u | -awk -v LINE='| ' -v NODE='|-- ' -v TAIL='`-- ' -v VOID=' ' -v HTML="$h" ' +find . \ + -name CVS -prune -o \ + -name .git -prune -o \ + -exec stat -f '%N%t%Sp %10z' {} + | +sort -u | +awk -v LINE='| ' -v NODE='|- ' -v TAIL='`- ' -v VOID=' ' ' { split($0, stat); @@ -22,7 +26,7 @@ awk -v LINE='| ' -v NODE='|-- ' -v TAIL='`-- ' -v VOID=' ' -v HTML="$h" ' } END { - for (i = 1; !stop; i++) { + for (i = 2; !stop; i++) { stop = tail = 1; for (l = NR; l > 0; l--) { if (line_v[l":"i] == LINE && tail) { @@ -39,9 +43,9 @@ END { for (l = 1; l <= NR; l++) { split(line_v[l":"0], name, "\t"); printf("%s ", name[2]) - for (i = 1; line_v[l":"i] != ""; i++) + for (i = 2; line_v[l":"i] != ""; i++) printf("%s", line_v[l":"i]); sub(".*/", "", name[1]); print(name[1]); } -}' +}' | more -e diff --git a/dot/profile b/dot/profile @@ -31,6 +31,7 @@ export CVSROOT="anoncvs@anoncvs.fr.openbsd.org:/cvs" export PKG_PATH="https://ftp.fr.openbsd.org/pub/OpenBSD/" export ABDUCO_SOCKET_DIR="$HOME/.cache" +export ABDUCO_CMD="dvtm-status" export MBLAZE="$HOME/.config/mblaze" export LESS="-~R" export LESSHISTFILE=-