commit 863aec4f06f57fd8bf830007ad33363e687ac162
parent c4c9953f664522e2c7b829771858d93d7de654d6
Author: Dylan Araps <dylan.araps@gmail.com>
Date: Tue, 28 Jan 2020 18:50:39 +0200
kiss: Don't run sed each iteration of loop
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kiss b/kiss
@@ -1254,9 +1254,8 @@ args() {
# Go over each alternative and format the file
# name for listing. (pkg_name>usr>bin>ls)
for pkg in *; do
- [ "$pkg" = '*' ] ||
- printf '%s\n' "$pkg" | sed 's|>| /|;s|>|/|g'
- done
+ [ "$pkg" = '*' ] || printf '%s\n' "$pkg"
+ done | sed 's|>| /|;s|>|/|g'
fi
;;