dimo414 / ProfileGem

A shell configuration utility to compartmentalize and manage your terminal utilities and environment
GNU General Public License v3.0
22 stars 6 forks source link

Review code style, refactor functions into namespaces #3

Open dimo414 opened 8 years ago

dimo414 commented 8 years ago

Original report by Michael Diamond (Bitbucket: dimo414).


Reference https://google.github.io/styleguide/shell.xml

The Google Style Guide suggests using :: to delimit function namespaces, but that prevents tab-completion¹ (perhaps that's an advantage?). . seems to be a common choice which does enable tab-completion.

¹ See Bash FAQ E13 and https://stackoverflow.com/a/12495727

dimo414 commented 7 years ago

Original comment by Michael Diamond (Bitbucket: dimo414).


There are really a couple different namespaces to support:

dimo414 commented 6 years ago

Original comment by Michael Diamond (Bitbucket: dimo414).


Gems should also have standard namespaces:

dimo414 commented 6 years ago

Original comment by Michael Diamond (Bitbucket: dimo414).


Different plan, along the lines of bash-cache:

Gems should similarly use a bar:: namespace (where "bar" is the name of the gem) for non-user-facing functions.

NB pg is a standard Unix command, so pg shouldn't be used directly.