Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #64 by quoting functions and set IFS on read #66

Merged
merged 1 commit into from
Jan 15, 2018
Merged

Conversation

rcaloras
Copy link
Owner

  • Fixes bug where IFS in outer environment could be set to something that
    would cause our inner functions to break on varibale expansion.

  • Added a couple unit tests.

- Fixes bug where IFS in outer environment could be set to something that
  would cause our inner functions to break on varibale expansion.

- Added a couple unit tests.
@rcaloras rcaloras merged commit da3f788 into master Jan 15, 2018
@rcaloras rcaloras deleted the ifs-fix-2 branch January 15, 2018 03:42
@@ -106,7 +106,7 @@ __bp_precmd_invoke_cmd() {
# Test existence of functions with: declare -[Ff]
if type -t "$precmd_function" 1>/dev/null; then
__bp_set_ret_value "$__bp_last_ret_value" "$__bp_last_argument_prev_command"
$precmd_function
"$precmd_function"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to leave a comment in the file somewhere noting why we need to quote function names.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

2 participants