stecman / symfony-console-completion

Automatic tab-key completion for Symfony console application options, arguments and parameters
MIT License
420 stars 26 forks source link

Disable mail checking during auto-complete output generation #60

Closed aik099 closed 8 years ago

aik099 commented 8 years ago

I've made changes without testing them, because I don't a setup at hand that would send me mail. Also I'm not sure about ; at the end of the lines. I see you're using them, but I've never used them and all worked anyway.

Please test.

Closes #59

aik099 commented 8 years ago

I've found a way how to test this:

  1. in 1st terminal window execute export MAILCHECK=1 to force checking for new mail each second
  2. in 2nd terminal window execute mail -s "Test Subject" username < /dev/null (replace username with your user) to send new mail
  3. in 1st terminal window hit ENTER in command line to see You have new mail message
aik099 commented 8 years ago

And it turns out that my fix doesn't work :(

Maybe I'm setting MAILCHECK env variable incorrectly.

aik099 commented 8 years ago

Done, ready for review. Tested on Slackware 13 on Bash 4.x that it works as expected.

stecman commented 8 years ago

Awesome, thanks.

Also I'm not sure about ; at the end of the lines. I see you're using them, but I've never used them and all worked anyway.

I've put these in just now.

They're needed in the BASH hook to terminate commands: loading via eval ends up stripping all of the new lines, which breaks the code otherwise. This is the same reason the comments are stripped out when the hook is rendered. Not ideal, but I haven't found a solution for this yet..