You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To provide better visibility of which lib file a func comes from, it would be better to rename them to include the group (lib file identifying string) as a prefix.
We should use the double colon separator.
e.g. git_branch() in habitual/git.functions becomes git::branch.
To provide backwards compatibility, we should add the original funcs as wrappers that call the newly named funcs (passing all args)
e.g.
# git_func() { local foo="$1" ; echo $foo ; } # original std.functionsgit::func() { local foo="$1";echo$foo; } # renamed original# ... and then lower down in the file ...###################################################################### @section DEPRECATED FUNCTIONS###################################################################### @desc. Renamed - see [git::func()](#git__func).git_func() { git::func "$*"; } # new wrapper for backwards compatibility
The deprecated wrapper functions should be moved to the bottom of the lib, so they appear in docs appropriately under their own section heading.
Bash doc for the wrapper should indicate that this old func name is deprecated
The text was updated successfully, but these errors were encountered:
jinal--shah
changed the title
rename funcs with group prefix (use colons)
func names should identify the source lib
Jul 4, 2019
To provide better visibility of which lib file a func comes from, it would be better to rename them to include the group (lib file identifying string) as a prefix.
We should use the double colon separator.
e.g.
git_branch()
in habitual/git.functions becomesgit::branch
.To provide backwards compatibility, we should add the original funcs as wrappers that call the newly named funcs (passing all args)
e.g.
The deprecated wrapper functions should be moved to the bottom of the lib, so they appear in docs appropriately under their own section heading.
Bash doc for the wrapper should indicate that this old func name is deprecated
The text was updated successfully, but these errors were encountered: