.sh

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

commit 86c21c1e37b0477bf8afa4010e094be035420208
parent f632888fd10a28440bd88874d49de374536056d1
Author: Byron Torres <b@torresjrjr.com>
Date:   Tue, 22 Jun 2021 01:26:40 +0100

Provide lf() with optional [path] argument

Diffstat:
Msh/.rc.sh | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/sh/.rc.sh b/sh/.rc.sh @@ -51,6 +51,12 @@ info() { } lf() { + [ -n "$1" ] && { + [ -d "$1" ] && pushd -q "$1" || { + echo "No directory '$1'"; return 1 + } + } + ( printf '\x1b[01;34;4m%s\x1b[0m\n' "$(pwd)" la -w 76 --color * \ @@ -61,6 +67,8 @@ lf() { ' ) \ | more -f + + [ -n "$1" ] && popd -q } gitf() {