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

Improved behaviour in global env #14

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

radhikalism
Copy link

Hi Huy,

I've committed three changes to my fork of bashmarks, all related to how it operates in the global interactive shell environment:

  • When the mktemp invocation fails (as in the recent GNU/BSD compatibility bug) the entire shell would exit; now it acts conditionally based on the return code of the mktemp call instead of calling exit.
  • Various function and variable names were in the global namespace — check_help and exit_message are particularly unpleasant. I have prefixed private functions with _bashmarks_; public functions (called by external programs like complete/compctl) with bashmarks_; and left user-interactive functions as they are.
  • The control flow concerning the help check was troubling because it relied on kill SIGINT, and also implemented each interactive command's behaviour under the abbreviated function name. I think it would be neater to abstract out the implementation, and thus avoid using kill too.

Let me know what you think, or feel free to apply any or all of the above. Thanks for the great utility, by the way! :-)

abhishek added 3 commits March 4, 2011 18:19
…leaving interactive function and configurable variable names unprefixed
…ctions implementing commands; also eschews need for kill in help function
tarobun added a commit to tarobun/bashmarks that referenced this pull request Mar 28, 2017
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