X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=dmenu_path;h=f64c82e67093d3fce4039839a1992175f6ab4c63;hb=9911455f5b7787c999a570faf33cf6ad0bec056c;hp=72ff3ed416ed2fb67d5b0d6e83bd28b33e7da827;hpb=68a24f5535030473e90426c30fafe75262add419;p=dmenu.git diff --git a/dmenu_path b/dmenu_path index 72ff3ed..f64c82e 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 | uniq +IFS=: +for dir in $PATH +do + for file in "$dir"/* + do + test -x "$file" && echo "${file##*/}" + done +done | sort | uniq