From: Anselm R. Garbe Date: Fri, 23 Feb 2007 14:28:25 +0000 (+0100) Subject: using the old-style fashion we uses earlier X-Git-Url: https://git.danieliu.xyz/?p=dmenu.git;a=commitdiff_plain;h=007be12f2bf7648f79138e834477e77f612766bb using the old-style fashion we uses earlier --- diff --git a/dmenu_path b/dmenu_path index 4008f4c..4ecf4fa 100755 --- a/dmenu_path +++ b/dmenu_path @@ -1,2 +1,9 @@ #!/bin/sh -/bin/ls -lL `echo $PATH | tr : ' '` 2> /dev/null | awk '$1 ~ /^[^d].*x/ { print $NF }' | sort -u +IFS=: +for dir in $PATH +do + for file in "$dir"/* + do + test -x "$file" && echo "${file##*/}" + done +done | sort -u