diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-05-27 18:01:01 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-05-27 18:01:01 -0300 |
commit | e74550e02b4ecfb1d1e15acdfce99007dca6babd (patch) | |
tree | 16428c648c9397b039253e9601451e1881a4078f | |
parent | 0ac89cdeb1d03c2dcb4f804497c4be7f9ac14236 (diff) | |
download | apps-e74550e02b4ecfb1d1e15acdfce99007dca6babd.tar.gz apps-e74550e02b4ecfb1d1e15acdfce99007dca6babd.tar.bz2 |
LSD: restrict listing to the repo
-rwxr-xr-x | lsd | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -4,12 +4,15 @@ # # Parameters +DIRNAME="`dirname $0`" BASENAME="`basename $0`" ACTION="$1" # List apps function lsd_list { #find -maxdepth 2 -iname 'readme*' -exec head -1 {} \; + ( + cd $DIRNAME find -maxdepth 2 -iname 'readme*' | while read readme; do if [ "$readme" == "./README.md" ]; then continue @@ -18,6 +21,7 @@ function lsd_list { echo -n "`dirname $readme | sed -e 's/^.\///'`: " head -1 $readme done + ) } # Dispatch |