Selaa lähdekoodia

Improve subcommand listing for help string

Alois Mahdal 10 vuotta sitten
vanhempi
commit
8470af0975
1 muutettua tiedostoa jossa 7 lisäystä ja 2 poistoa
  1. 7
    2
      src/bin/saturnin.skel

+ 7
- 2
src/bin/saturnin.skel Näytä tiedosto

@@ -32,8 +32,13 @@ print_help() {
32 32
     echo ""
33 33
     echo "valid sub-commands:"
34 34
     echo ""
35
-    ls "$SATURNIN_LIBEXEC" \
36
-      | sed -e 's/saturnin-/    /'
35
+    find "$SATURNIN_LIBEXEC" \
36
+        -mindepth 1 \
37
+        -maxdepth 1 \
38
+        -executable \
39
+      | sed -e 's/.*saturnin-/    /' \
40
+      | sort
41
+    return "$FFOO_EXIT_OK"
37 42
 }
38 43
 
39 44
 version_info() {