Kaynağa Gözat

Add -o|--only option to list modules from only one directory

Useful when working with a private set of modules; to see what's inside,
etc.
Alois Mahdal 6 yıl önce
ebeveyn
işleme
b8145b0dd5
1 değiştirilmiş dosya ile 2 ekleme ve 0 silme
  1. 2
    0
      src/bin/sfdoc

+ 2
- 0
src/bin/sfdoc Dosyayı Görüntüle

@@ -35,6 +35,7 @@ usage() {
35 35
             "-I PTH, --include PTH  Include path PTH when searching"    \
36 36
             "                   for modules; can be specified multiple" \
37 37
             "                   times."                                 \
38
+            "-o PTH, --only-from PTH  Searcho only under path PTH."     \
38 39
         --                                                              \
39 40
         "Without command specified, will try to display documentation"  \
40 41
         "in man(1) pager."
@@ -74,6 +75,7 @@ main() {
74 75
         -I|--include)   SHELLFU_PATH="$2:$SHELLFU_PATH"; shift 2 || usage ;;
75 76
         -l|--ls)        action=lsx;                 shift; break ;;
76 77
         -L|--lsmod)     action=lsm;                 shift; break ;;
78
+        -o|--only-from) SHELLFU_PATH="$2"; SHELLFU_INCLUDE=""; shift 2 || usage ;;
77 79
         --lsvar)        action=lsv;                 shift; break ;;
78 80
         --lsfun)        action=lsf;                 shift; break ;;
79 81
         -e|--export)    action=exp; format="$2";    shift 2 || usage; break ;;