From 17f15d91ee5c90620af6e0fba55180c8c0c93f45 Mon Sep 17 00:00:00 2001 From: ZaxonXP Date: Wed, 13 Jan 2021 23:51:40 +0100 Subject: [PATCH] Use find instead du for more efficient execution. (#880) Find is faster and it is only one command. The last `:` is removed by the parameter expansion (works in both Bash and Zsh). --- .config/shell/profile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/shell/profile b/.config/shell/profile index e720376..06831cb 100644 --- a/.config/shell/profile +++ b/.config/shell/profile @@ -6,7 +6,7 @@ # to clean up. # Adds `~/.local/bin` to $PATH -export PATH="$PATH:$(du "$HOME/.local/bin" | cut -f2 | paste -sd ':' -)" +export PATH="$PATH:${$(find ~/.local/bin -type d -printf %p:)%%:}" unsetopt PROMPT_SP