mojombo/tomdoc — Issue #30: Return values of shell functions
Author: mlafeldt
Created: 2011-10-25 16:44:23+00:00
State: open

Hi,

I started using TomDoc for some shell scripts of mine and I really like it so far.

One thing I'm not entirely sure how to do best though is the ```Returns``` part.

In shell, it is common to have functions that return:

- a status code via ```return```
- a string via ```echo``` or ```printf``` etc.
- both a status code and a string, e.g. exit status and matched lines returned by ```grep```

It's simple to document the first case with TomDoc's ```Returns``` line. But how to communicate the other cases?

(I guess writing to stdout to "return" strings is somehow unique to shell programming.)