.sh

[sh] Multi-shell dotfiles manager
git clone https://git.torresjrjr.com/.sh.git
Log | Files | Refs | README | LICENSE

commit 11af0677ed4ba0cf520b125349160351514fc107
parent 00254197594b1bdf33c5fea93ab7889062d15c44
Author: Byron Torres <b@torresjrjr.com>
Date:   Wed, 15 Feb 2023 22:25:39 +0000

lf*: add $esc variable, fix for Alpine

Diffstat:
Mbin/lf | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/bin/lf b/bin/lf @@ -1,5 +1,7 @@ #!/bin/sh -eu +esc=$(printf '\x1b') + list() { ( env printf '\x1b[01;34;4m%s\x1b[0m\n' "$(pwd)" @@ -10,8 +12,8 @@ list() { /^.*[^:]$/ {printf " " $0 "\n"} ' ) \ - | sed -E 's/\.([^. ]*)( *)/.\x1b[1m\1\x1b[0m\2/g' \ - | more -ef + | sed -E "s|\.([^. ]*)( *)|.$esc[1m\1$esc[0m\2|g" \ + | more -f } [ "$#" -eq 0 ] && {