Преглед изворни кода

Rename binary: shellfu-doc to sfdoc

'sfdoc' is easier to type and resembles 'pydoc' and 'perldoc' so it's
even easier to remember.
Alois Mahdal пре 6 година
родитељ
комит
50a485467b
36 измењених фајлова са 21 додато и 21 уклоњено
  1. 7
    7
      README.md
  2. 1
    1
      mkit.ini
  3. 1
    1
      notes/intro.md
  4. 1
    1
      packaging/debian/shellfu-devel.install
  5. 2
    2
      packaging/template.spec
  6. 0
    0
      src/bin/sfdoc
  7. 6
    6
      tests/sfdoc/TF_RUN
  8. 0
    0
      tests/sfdoc/oracle/direct_path.stderr
  9. 0
    0
      tests/sfdoc/oracle/direct_path.stdout
  10. 0
    0
      tests/sfdoc/oracle/empty.stderr
  11. 0
    0
      tests/sfdoc/oracle/empty.stdout
  12. 0
    0
      tests/sfdoc/oracle/included_path.stderr
  13. 0
    0
      tests/sfdoc/oracle/included_path.stdout
  14. 0
    0
      tests/sfdoc/oracle/lsf_tricky.stderr
  15. 0
    0
      tests/sfdoc/oracle/lsf_tricky.stdout
  16. 0
    0
      tests/sfdoc/oracle/lsv_tricky.stderr
  17. 0
    0
      tests/sfdoc/oracle/lsv_tricky.stdout
  18. 0
    0
      tests/sfdoc/oracle/lsx_tricky.stderr
  19. 0
    0
      tests/sfdoc/oracle/lsx_tricky.stdout
  20. 0
    0
      tests/sfdoc/oracle/naked.stderr
  21. 0
    0
      tests/sfdoc/oracle/naked.stdout
  22. 0
    0
      tests/sfdoc/oracle/nonesuch.stderr
  23. 0
    0
      tests/sfdoc/oracle/nonesuch.stdout
  24. 0
    0
      tests/sfdoc/oracle/simple.stderr
  25. 0
    0
      tests/sfdoc/oracle/simple.stdout
  26. 0
    0
      tests/sfdoc/oracle/simplest.stderr
  27. 0
    0
      tests/sfdoc/oracle/simplest.stdout
  28. 0
    0
      tests/sfdoc/oracle/tricky.stderr
  29. 0
    0
      tests/sfdoc/oracle/tricky.stdout
  30. 0
    0
      tests/sfdoc/test/include/empty.sh
  31. 0
    0
      tests/sfdoc/test/include/naked.sh
  32. 0
    0
      tests/sfdoc/test/include/simple.sh
  33. 0
    0
      tests/sfdoc/test/include/simplest.sh
  34. 0
    0
      tests/sfdoc/test/include/tricky.sh
  35. 0
    0
      tests/sfdoc/test/other/path.sh
  36. 3
    3
      tests/shellfu_api/TF_RUN

+ 7
- 7
README.md Прегледај датотеку

85
 And that's also *all* this command does.
85
 And that's also *all* this command does.
86
 
86
 
87
 Next, if you have also installed some modules, you can look around
87
 Next, if you have also installed some modules, you can look around
88
-using `shellfu-doc`:
88
+using `sfdoc`:
89
 
89
 
90
-    shellfu-doc --lsmods
91
-    shellfu-doc inigrep
90
+    sfdoc --lsmods
91
+    sfdoc inigrep
92
 
92
 
93
 This is how you access documentation of modules available on the system.
93
 This is how you access documentation of modules available on the system.
94
 You can also access documentation of a modules directly by specifying
94
 You can also access documentation of a modules directly by specifying
95
 path to the file (the path must contain slash):
95
 path to the file (the path must contain slash):
96
 
96
 
97
-    shellfu-doc path/to/my/module.sh
97
+    sfdoc path/to/my/module.sh
98
 
98
 
99
-Note that shellfu-doc only works if the module follows Shellfu Style
99
+Note that sfdoc only works if the module follows Shellfu Style
100
 Guide, in particular the Docstrings section.
100
 Guide, in particular the Docstrings section.
101
 
101
 
102
 Next, you can create your first Shellfu-Bash script:
102
 Next, you can create your first Shellfu-Bash script:
130
  2. Using `shellfu import pretty`, we're importing module called "pretty".
130
  2. Using `shellfu import pretty`, we're importing module called "pretty".
131
     shellfu will figure out where exactly it is.
131
     shellfu will figure out where exactly it is.
132
 
132
 
133
- 3. If we called `shellfu-doc pretty` in another terminal, we would find
133
+ 3. If we called `sfdoc pretty` in another terminal, we would find
134
     out that among others, this module contains functions `think`, `debug`,
134
     out that among others, this module contains functions `think`, `debug`,
135
     `warn` and `die`.
135
     `warn` and `die`.
136
 
136
 
162
     my_module.sh is.
162
     my_module.sh is.
163
 
163
 
164
 To get the basic stuff, nothing more is really needed.  If you want, however,
164
 To get the basic stuff, nothing more is really needed.  If you want, however,
165
-your module be explorable by `shellfu-doc`, you need to follow Shellfu Style
165
+your module be explorable by `sfdoc`, you need to follow Shellfu Style
166
 Guide.
166
 Guide.
167
 
167
 
168
 
168
 

+ 1
- 1
mkit.ini Прегледај датотеку

41
     share    = 644
41
     share    = 644
42
 
42
 
43
 [files]
43
 [files]
44
-    bin      = src/bin/shellfu-doc
44
+    bin      = src/bin/sfdoc
45
     bin      = src/bin/shellfu-embed
45
     bin      = src/bin/shellfu-embed
46
     bin      = src/bin/sfpath
46
     bin      = src/bin/sfpath
47
     doc      = LICENSE.md
47
     doc      = LICENSE.md

+ 1
- 1
notes/intro.md Прегледај датотеку

75
     allowing you to collaborate on the code in an efficient manner
75
     allowing you to collaborate on the code in an efficient manner
76
     (in-line documentation, peer review, code readability...).
76
     (in-line documentation, peer review, code readability...).
77
 
77
 
78
- *  As a bonus, *shellfu-doc*, building upon the Shellfu Style Guide,
78
+ *  As a bonus, *sfdoc*, building upon the Shellfu Style Guide,
79
     allows your user to discover and read documentation of installed
79
     allows your user to discover and read documentation of installed
80
     modules (akin to *perldoc* or *pydoc*).
80
     modules (akin to *perldoc* or *pydoc*).
81
 
81
 

+ 1
- 1
packaging/debian/shellfu-devel.install Прегледај датотеку

1
 /etc/bash_completion.d/shellfu-devel.bash
1
 /etc/bash_completion.d/shellfu-devel.bash
2
-/usr/bin/shellfu-doc
2
+/usr/bin/sfdoc
3
 /usr/bin/shellfu-embed
3
 /usr/bin/shellfu-embed

+ 2
- 2
packaging/template.spec Прегледај датотеку

50
 Requires: shellfu-bash-core
50
 Requires: shellfu-bash-core
51
 %description devel
51
 %description devel
52
 This sub-package contains tools useful mostly for development of shellfu
52
 This sub-package contains tools useful mostly for development of shellfu
53
-scripts; most notably shellfu-doc which provides access to online
53
+scripts; most notably sfdoc which provides access to online
54
 (as in traditional man pages) documentation of shellfu modules.
54
 (as in traditional man pages) documentation of shellfu modules.
55
 
55
 
56
 %package sh
56
 %package sh
111
 
111
 
112
 %files devel
112
 %files devel
113
 %config %{_sysconfdir}/bash_completion.d/shellfu-devel.bash
113
 %config %{_sysconfdir}/bash_completion.d/shellfu-devel.bash
114
-%{_bindir}/shellfu-doc
114
+%{_bindir}/sfdoc
115
 %{_bindir}/shellfu-embed
115
 %{_bindir}/shellfu-embed
116
 
116
 
117
 %files sh
117
 %files sh

src/bin/shellfu-doc → src/bin/sfdoc Прегледај датотеку


tests/shellfu_doc/TF_RUN → tests/sfdoc/TF_RUN Прегледај датотеку

29
     local name=$1
29
     local name=$1
30
     local cmd
30
     local cmd
31
     case $name in
31
     case $name in
32
-        lsx_tricky)    cmd="shellfu-doc --ls test/include/tricky.sh" ;;
33
-        lsv_tricky)    cmd="shellfu-doc --lsvar test/include/tricky.sh" ;;
34
-        lsf_tricky)    cmd="shellfu-doc --lsfun test/include/tricky.sh" ;;
35
-        direct_path)   cmd="shellfu-doc -e markdown test/other/path.sh" ;;
36
-        included_path) cmd="shellfu-doc -I test/other -e markdown path" ;;
37
-        *)             cmd="shellfu-doc -e markdown $name" ;;
32
+        lsx_tricky)    cmd="sfdoc --ls test/include/tricky.sh" ;;
33
+        lsv_tricky)    cmd="sfdoc --lsvar test/include/tricky.sh" ;;
34
+        lsf_tricky)    cmd="sfdoc --lsfun test/include/tricky.sh" ;;
35
+        direct_path)   cmd="sfdoc -e markdown test/other/path.sh" ;;
36
+        included_path) cmd="sfdoc -I test/other -e markdown path" ;;
37
+        *)             cmd="sfdoc -e markdown $name" ;;
38
     esac
38
     esac
39
     tf_testflt -n "$name" -O "oracle/$name.stdout" -E "oracle/$name.stderr" "$cmd"
39
     tf_testflt -n "$name" -O "oracle/$name.stdout" -E "oracle/$name.stderr" "$cmd"
40
 }
40
 }

tests/shellfu_doc/oracle/direct_path.stderr → tests/sfdoc/oracle/direct_path.stderr Прегледај датотеку


tests/shellfu_doc/oracle/direct_path.stdout → tests/sfdoc/oracle/direct_path.stdout Прегледај датотеку


tests/shellfu_doc/oracle/empty.stderr → tests/sfdoc/oracle/empty.stderr Прегледај датотеку


tests/shellfu_doc/oracle/empty.stdout → tests/sfdoc/oracle/empty.stdout Прегледај датотеку


tests/shellfu_doc/oracle/included_path.stderr → tests/sfdoc/oracle/included_path.stderr Прегледај датотеку


tests/shellfu_doc/oracle/included_path.stdout → tests/sfdoc/oracle/included_path.stdout Прегледај датотеку


tests/shellfu_doc/oracle/lsf_tricky.stderr → tests/sfdoc/oracle/lsf_tricky.stderr Прегледај датотеку


tests/shellfu_doc/oracle/lsf_tricky.stdout → tests/sfdoc/oracle/lsf_tricky.stdout Прегледај датотеку


tests/shellfu_doc/oracle/lsv_tricky.stderr → tests/sfdoc/oracle/lsv_tricky.stderr Прегледај датотеку


tests/shellfu_doc/oracle/lsv_tricky.stdout → tests/sfdoc/oracle/lsv_tricky.stdout Прегледај датотеку


tests/shellfu_doc/oracle/lsx_tricky.stderr → tests/sfdoc/oracle/lsx_tricky.stderr Прегледај датотеку


tests/shellfu_doc/oracle/lsx_tricky.stdout → tests/sfdoc/oracle/lsx_tricky.stdout Прегледај датотеку


tests/shellfu_doc/oracle/naked.stderr → tests/sfdoc/oracle/naked.stderr Прегледај датотеку


tests/shellfu_doc/oracle/naked.stdout → tests/sfdoc/oracle/naked.stdout Прегледај датотеку


tests/shellfu_doc/oracle/nonesuch.stderr → tests/sfdoc/oracle/nonesuch.stderr Прегледај датотеку


tests/shellfu_doc/oracle/nonesuch.stdout → tests/sfdoc/oracle/nonesuch.stdout Прегледај датотеку


tests/shellfu_doc/oracle/simple.stderr → tests/sfdoc/oracle/simple.stderr Прегледај датотеку


tests/shellfu_doc/oracle/simple.stdout → tests/sfdoc/oracle/simple.stdout Прегледај датотеку


tests/shellfu_doc/oracle/simplest.stderr → tests/sfdoc/oracle/simplest.stderr Прегледај датотеку


tests/shellfu_doc/oracle/simplest.stdout → tests/sfdoc/oracle/simplest.stdout Прегледај датотеку


tests/shellfu_doc/oracle/tricky.stderr → tests/sfdoc/oracle/tricky.stderr Прегледај датотеку


tests/shellfu_doc/oracle/tricky.stdout → tests/sfdoc/oracle/tricky.stdout Прегледај датотеку


tests/shellfu_doc/test/include/empty.sh → tests/sfdoc/test/include/empty.sh Прегледај датотеку


tests/shellfu_doc/test/include/naked.sh → tests/sfdoc/test/include/naked.sh Прегледај датотеку


tests/shellfu_doc/test/include/simple.sh → tests/sfdoc/test/include/simple.sh Прегледај датотеку


tests/shellfu_doc/test/include/simplest.sh → tests/sfdoc/test/include/simplest.sh Прегледај датотеку


tests/shellfu_doc/test/include/tricky.sh → tests/sfdoc/test/include/tricky.sh Прегледај датотеку


tests/shellfu_doc/test/other/path.sh → tests/sfdoc/test/other/path.sh Прегледај датотеку


+ 3
- 3
tests/shellfu_api/TF_RUN Прегледај датотеку

25
 
25
 
26
 shellfu_get_all() {
26
 shellfu_get_all() {
27
     local t=$1      # type (functions, variables, modules)
27
     local t=$1      # type (functions, variables, modules)
28
-    shellfu-doc --all --lsmod \
28
+    sfdoc --all --lsmod \
29
       | flt_ours \
29
       | flt_ours \
30
       | case $t in
30
       | case $t in
31
             modules)    cat ;;
31
             modules)    cat ;;
32
-            variables)  xargs -L1 shellfu-doc --all --lsvar ;;
33
-            functions)  xargs -L1 shellfu-doc --all --lsfun ;;
32
+            variables)  xargs -L1 sfdoc --all --lsvar ;;
33
+            functions)  xargs -L1 sfdoc --all --lsfun ;;
34
         esac \
34
         esac \
35
       | LC_ALL=C sort
35
       | LC_ALL=C sort
36
 }
36
 }