`grep -P` gives access to the PCRE matching engine, which is nice,
however, the version of grep shipped on many BSD systems (including
Darwin) does not have this flag.
Currently, `grep -P` was being used in the `_includes()` test helper.
For cross platform compatibility in tests, do not rely upon this option.
Luckily, all existing tests seem to work fine without it already!
they were just there when we were making sure the env variable shell
selection was working properly in all cases, now that we know it is,
they can be removed.
don’t bother on macosx (preinstalled) or if the test matrix for that
box isn’t going to be testing in zsh.
this should speed up test runs for most cases, and later we can define
fast_failure and not have to wait for the longer ones.
More parallelism = faster tests. Also better isolation for changes that
might only break on zsh or bash respectively.
This is defined via env variable, so someone running locally will have
all tests run sequentially as before.
Requires beta access, thankfully the travis gods have blessed us for the
main repo and my fork!
This should allow us to make sure scm_breeze operates reliably in both
Linux and BSD/Darwin, because there are small shell differences
(especially with default tools) that are causing errors I noticed on
MacOSX.
this is unrelated to the previous commit and zero functionality but
while I was changing things I wanted to clean up the indentation and
use consistent single quotes versus double quotes in the functions
calls for `_alias()` and `_git_alias()`.
In my opinion this makes the file more readable, but if it bothers you
let me know and I’ll be happy to remove it from the pull request.
The ability to not define default aliases in the `.git.scmbrc` file
leading to not having those aliases not present worked fine in bash.
However, this seems to still have thrown an error in zsh. For example,
if you commented out the line:
git_checkout_alias="gco"
then when sourcing scm_breeze aliases.sh would throw an error.
This applied only to aliases defined with the `_alias()` function and
not those with the `_git_alias()` function.
To fix this, I wrapped `_alias()` in a similar check to the one
`_git_alias()` has, where it passes the portions as arguments and
verifies the first is present before proceeding.
I'm not 100% certain why seperate functions exist for these two things
to begin with (as far as I can tell from a cursory examination the main
difference is `_git_aliases()` defines a tab completion?) but I believe
my change has fixed the ability to comment out aliases in `.git.scmbrc`
in zsh for users who do not want them (I'm in this boat, there are too
many for me and I get confused).
I tested manually in both bash and zsh and it appears to work, however
you might want to review this before merging given my relative
unfamiliarity with the codebase.
`gh` is the new `hub`, rewritten to be fast and efficient.
http://owenou.com/gh/
If has been adopted by GitHub themselves and will replace `hub`
entirely, see:
https://github.com/github/hub/issues/475
This patch simply checks for `gh` as a possible `_git_cmd` in addition
to hub, restoring scm_breeze functionality for people who have switched
to gh.
This change makes sure LC_MESSAGES is set to C whenever command output
is run through grep, sed etc. Otherwise aliasing will fail whenever
localized messages are printed.
This should fix#98 and #64.