shell dot on steroids https://pagure.io/shellfu

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #!/bin/bash
  2. #
  3. # Some arbitrary text like License and authourship info
  4. # this time the text is somewhat longer and has its own
  5. # paragraphs.
  6. #
  7. # This is an example of such paragraph, which does span
  8. # more than one, more than two, in fact, actually about
  9. # three lines.
  10. #
  11. #
  12. # A test module with functions, variables and long docstring
  13. #
  14. # This one has even the module docstring longer as it can then
  15. # form a testcase of such module.
  16. #
  17. # # Usage #
  18. #
  19. # This module is only used for testing of docstring parsing
  20. # and object (by which we mean *function* or *variable*, not
  21. # some OOP stuff) printing functionality.
  22. #
  23. # The internal format is Markdown-ish, but is parsed as plain
  24. # text. But still, as an example we will try to use some
  25. # common Markdown. For example, this:
  26. #
  27. # #!/bin/bash
  28. # #
  29. #
  30. # is like first two lines of this file look like.
  31. #
  32. #
  33. # A test variable with a short docstring
  34. #
  35. PATH_LIMIT=42
  36. #
  37. # A test variable with a long docstring
  38. #
  39. # Not really long but the longer version (header plus
  40. # the rest)
  41. #
  42. PATH_DEBUG=${PATH_DEBUG:-false}
  43. path_foo() {
  44. #
  45. # A test function with a short docstring
  46. #
  47. local foo=$1
  48. local bar
  49. bar=$foo
  50. echo $foo
  51. }
  52. path_other_function() {
  53. #
  54. # A test function with a long docstring
  55. #
  56. # Not really long but the longer version (header plus
  57. # the rest)
  58. #
  59. :
  60. }