Commit Graph

370 Commits

Author SHA1 Message Date
Tom "Ravi" Hale
77b1717008 Avoid test with no arguments and unnecessary subshell 2018-08-17 12:49:07 +07:00
Michael Mior
1f3b8a6b11 Use ^M instead of
for newlines
2018-07-05 16:21:02 -04:00
Nathan Broadbent
65df76ebe4 Fixed key binding 2017-05-06 23:13:45 +07:00
Nathan Broadbent
6745822953 Fix IFS issues - have to always unset after use 2017-02-19 20:05:59 +07:00
Wilhelmina Drengwitz
6baa3c90c8 Merge pull request #128 from dlee/fix_branch_shortcuts_offset
Fix shortcuts offset when branch_shortcuts encounters detached HEAD
2017-02-07 09:08:55 -05:00
Wilhelmina Drengwitz
8c21b3d87f Merge pull request #152 from mroth/fix-clear-vars
BUGFIX: make `git_clear_vars()` actually clear variables
2017-01-30 15:21:44 -05:00
Wilhelmina Drengwitz
beacd7d8a6 Merge pull request #153 from mroth/integrated-branch-porcelain
integrate branch parsing into single system call
2017-01-30 15:19:59 -05:00
Martino Visintin
4d4736d406 remove unimplemented scms 2017-01-27 21:22:43 +00:00
Andy Zhang
76fc67b9fd Bump git index depth to 5 for golang src structure 2016-11-14 11:30:06 -08:00
Antti Salminen
942f2bdd90 Expand arguments for git difftool. 2016-08-28 15:18:47 -04:00
Willa D
d804b2860e Merge pull request #206 from eballerini/apply-alias
added 'git apply' alias

Don't see a completely compelling case where `git apply` really benefits from having access to scm_breeze index shortcuts. `gapp` alias could be pruned in the future.
2016-08-28 15:09:44 -04:00
Wilhelmina Drengwitz
95c082c75c Merge branch 'jawshooah-submodule-update' 2016-08-28 14:46:41 -04:00
Nathan Broadbent
49dca42056 Remove "gh" alias 2016-08-17 15:00:51 +07:00
Emmanuel B
c655ace09c added 'git apply' alias 2016-07-06 07:53:18 -04:00
Nathan Broadbent
db85db81a9 Merge pull request #160 from jawshooah/pull-rebase
Add alias for "git pull --rebase"
2016-07-01 16:17:25 +07:00
Nathan Broadbent
a8c30f7351 Merge commit '40e91b8' 2016-05-14 22:38:59 +07:00
Nathan Broadbent
da0af808d0 Merge pull request #185 from patbl/master
exec_scmb_expand_args: Escape ampersands.
2016-05-14 22:33:26 +07:00
Nathan Broadbent
2d5d404f66 Merge pull request #197 from tjlevine/noclobber-fix
Use >| operator in _rebuild_git_index when overwriting .git_index file
2016-05-14 22:32:25 +07:00
Nathan Broadbent
47a0b6c724 Add git whatchanged alias (gwc), thanks tjlevine (#196) 2016-05-14 22:31:55 +07:00
Nathan Broadbent
9f850c0dd0 Merge pull request #191 from aswin/master
Change gd to be 'git diff' without the two dashes. Add a new alias gd…
2016-05-14 22:29:18 +07:00
Nathan Broadbent
987da4d6a2 Skip env variables for git branch if there are more than 300 branches 2016-05-14 22:27:04 +07:00
Nathan Broadbent
2e10cedb20 Merge pull request #199 from shinriyo/patch-1
top level path shortcut
2016-05-14 22:11:56 +07:00
Brian Peiris
0d80de33e6 Fix infinite loop in shell with babun (cygwin) 2016-04-11 05:10:36 -04:00
shinriyo
62d8df8371 top level path shortcut
top level path shortcut "gtop"
2016-03-16 18:09:42 +09:00
Tyler Levine
747b60cf37 Use >| operator in _rebuild_git_index when overwriting .git_index file
If the shell has the noclobber option set, s --rebuild will fail to
update the .git_index file. Using the >| operator instead of the >
operator forces the .git_index file to be clobbered, which is the
desired behavior.
2016-03-14 12:56:15 -07:00
Aswinkumar Rajendiran
8086742768 Change gd to be 'git diff' without the two dashes. Add a new alias gdf for 'git diff --' 2015-10-14 18:09:28 -07:00
Patrick Brinich-Langlois
6e28eb645a exec_scmb_expand_args: Escape ampersands. 2015-08-23 21:51:27 -07:00
Nathan Broadbent
53aba36670 Fix issue with aliases that have no args 2015-06-16 17:20:29 +07:00
Alexey Komnin
71f3086df9 Fix setting alias for "_scmb_git_branch_shortcuts"
__git_alias expects three arguments. Passing two arguments to __git_alias for "gb" leads to undesirable behaviour on some platforms.
2015-06-03 11:47:14 +03:00
Armen Baghumian
5dd21beeea Fixes 'git fetch' and 'git checkout' liases, closes #176 2015-05-28 14:05:33 +00:00
Armen Baghumian
ff4ae7932d Fixed __git_alias bug in zsh 2015-05-26 12:46:11 +00:00
Nathan Broadbent
d288f3cd74 Fixed bug in __git_alias 2015-05-25 23:01:14 +07:00
Armen Baghumian
1ef06aa9cd Offset starts from 0 so the argument would be 3
This patch fixes broken aliases which have arguments (e.g. gap)
2015-05-21 04:09:57 +00:00
James Ravn
bdf6096808 Fix quoting of semicolon and pipe 2015-05-10 00:39:05 +01:00
Stephan van Eijkelenburg
e9217f50ab Fixes #168 (zsh-problems)
This PR replaces `local varname=value` style declarations with `local varname; varname=value`. This solves #168 which caused troubles in zsh environments
2015-05-07 17:02:34 +02:00
Josh Hagins
40e91b81ff Add alias for git diff -w -- 2015-05-06 12:49:30 -04:00
Josh Hagins
9e24890de6 Add alias for git pull --rebase 2015-05-06 12:48:43 -04:00
Josh Hagins
d763faa68c Add aliases for submodule update 2015-05-06 12:48:11 -04:00
Nathan Broadbent
d52ad497bc Merge pull request #162 from jawshooah/fix_git_alias
Fix argument expansion in __git_alias
2015-05-02 18:17:24 +07:00
Jean Blanchard
349896b0cf Make ls aliases optional 2015-03-06 09:41:31 +00:00
Josh Hagins
84b765eab9 Fix argument expansion in __git_alias 2015-01-20 22:38:49 -05:00
Nathan Broadbent
fef74e26a5 Added alias for git pull-request (hub) 2014-12-17 10:52:48 +06:00
Matthew Rothenberg
23e99709da integrate branch parsing into single system call
The `git status --porcelain` command can take an additional argument
`-b` which causes the porcelain output to also contain branch
information in a stable and supposedly nonchanging way.

This change adds that argument to the initial `git status` call, and
parses the branch/ahead/behind information from that.  The end result is
the entire call to `git branch -v` can be removed, resulting in one less
subshell command and hopefully a more reliable target across future
versions of git.
2014-10-15 02:41:21 -04:00
Matthew Rothenberg
ed2240e214 BUGFIX: actually clear variables
The current `git_clear_vars()` method appears to have iterated over all
the existing set variable correctly, but never actually bothered to
clear them.
2014-10-15 02:21:35 -04:00
Matthew Rothenberg
f14015fc3e aliases: consistent indentation and quotation
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.
2014-10-02 21:01:58 -04:00
Matthew Rothenberg
70c9501550 fix ability to undefine default aliases in zsh
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.
2014-10-02 20:42:43 -04:00
Matthew Rothenberg
1e9d60a06a gh is the new hub
`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.
2014-10-02 14:19:36 -04:00
Nathan Broadbent
bda4fab9bd Merge pull request #145 from aero-z/fix-rename-modify
Don't show oldname -> newname for unstaged modifications
2014-07-23 23:12:14 -07:00
keen99
a1afeef0c4 make _create_or_patch_scmbrc noclobber safe
use >| instead of > to override noclobber on write (works for both bash and zsh)
2014-07-08 16:01:58 -04:00
aero-z
ee5c1e5aa0 Changing the output for git status when there is a rename and modify at the same time 2014-06-12 02:47:56 -04:00