|
@@ -26,7 +26,15 @@ do_lsfun() {
|
26
|
26
|
#
|
27
|
27
|
# List functions from module $1 or all
|
28
|
28
|
#
|
29
|
|
- shellfu _list_functions "$modspec"
|
|
29
|
+ local modspec="$1"
|
|
30
|
+ if $show_hidden;
|
|
31
|
+ then
|
|
32
|
+ shellfu _list_functions "$modspec"
|
|
33
|
+ else
|
|
34
|
+ shellfu _list_functions "$modspec" \
|
|
35
|
+ | grep -v ^_ \
|
|
36
|
+ | grep -v \\._
|
|
37
|
+ fi
|
30
|
38
|
}
|
31
|
39
|
|
32
|
40
|
do_lsmod() {
|
|
@@ -34,7 +42,13 @@ do_lsmod() {
|
34
|
42
|
# List available modules
|
35
|
43
|
#
|
36
|
44
|
local modspec="$1"
|
37
|
|
- shellfu _list_modules "$modspec"
|
|
45
|
+ if $show_hidden;
|
|
46
|
+ then
|
|
47
|
+ shellfu _list_modules "$modspec"
|
|
48
|
+ else
|
|
49
|
+ shellfu _list_modules "$modspec" \
|
|
50
|
+ | grep -v ^_
|
|
51
|
+ fi
|
38
|
52
|
}
|
39
|
53
|
|
40
|
54
|
do_path() {
|
|
@@ -54,11 +68,13 @@ do_version() {
|
54
|
68
|
|
55
|
69
|
main() {
|
56
|
70
|
local action="usage"
|
|
71
|
+ local show_hidden=false
|
57
|
72
|
local include=""
|
58
|
73
|
while true; do case "$1" in
|
59
|
74
|
--version) do_version; exit ;;
|
60
|
75
|
--version-semver) do_semver; exit ;;
|
61
|
76
|
-I|--include) include="$2"; shift 2 || usage ;;
|
|
77
|
+ -a|--all) show_hidden=true; shift ;;
|
62
|
78
|
-d|--debug) SHELLFU_DEBUG=true; shift ;;
|
63
|
79
|
catfun|lsfun|lsmod|path) action="$1"; shift; break ;;
|
64
|
80
|
*) usage ;;
|