dotfiles

configurations and scripts
git clone https://riazj.com/git/dotfiles
Log | Files | Refs | LICENSE

commit bdb3c7c856af5d190a58caa71082ecb1567d051d
parent 6df6bddfab240a56085bd572967e57fa762005d7
Author: Riaz <riaz@riazj.com>
Date:   Sat, 19 Jul 2025 09:03:26 -0700

bin/tldr: Speed improvement

Diffstat:
M.local/bin/tldr | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.local/bin/tldr b/.local/bin/tldr @@ -3,7 +3,7 @@ PAGES="$XDG_CACHE_HOME/tldr/pages" [ $# -eq 0 ] && { echo "usage: tldr command [platform]"; exit; } -[ -d "$PAGES/$2" ] && page="$(find "$PAGES/$2" -name "$1.md" -print -quit)" -[ -f "$page" ] && { cat "$page"; exit; } +[ -d "$PAGES/$2" ] && page="$(find "$PAGES/$2" -name "$1.md" -exec cat {} \; -quit)" +[ -n "$page" ] && { printf "%s\n" "$page"; exit; } printf "tldr: %s not found\n" "$1"; exit 1