Skip to content

Conversation

@ChristianSilvermoon
Copy link
Contributor

One of the intended methods of usage for bd is to source it, executing it in the current shell.

Doing so leaves the functions usage_error(), help_msg(), and newpwd() defined, however, which may be undesirable.

This PR prefixes all function names with _bd_ (example: usage_error() becomes _bd_usage_error()) so that they are less likely to override anything important.

It also calls unset -f to remove the function definitions at the end of execution so that the functions do not remain defined if bd is sourced.

* Prefixed all functions with '_bd_' (Override protection)
* Now unsets functions at end of execution to prevent leaving them defined in current shell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant