Commit Graph

31 Commits

Author SHA1 Message Date
Tom "Ravi" Hale
80ec1ad2ad Replace built-in shell array quoting with printf %q 2018-09-12 17:57:46 +07:00
Tom "Ravi" Hale
fb7d227c30 Add _safe_eval: quote $@ elements before eval 2018-09-02 11:28:19 +07: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
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
Nathan Broadbent
3dcf934a75 Use builtin type to protect against aliases 2012-11-17 11:42:33 +13:00
Nathan Broadbent
0a797fb620 Provide X-compatible find_binary function that finds a binary for a given command. Works with zsh/bash 2012-11-17 11:41:08 +13:00
Yan Pritzker
480045e5a4 Pick the first git in case there are multiple 2012-11-13 10:27:57 -06:00
Nathan Broadbent
992b1866b2 Use type -p / -P to determine git binary 2012-11-13 12:45:01 +13:00
Nathan Broadbent
c20b91442a Use $GIT_BINARY when original git binary is needed 2012-10-23 13:52:04 +13:00
Nathan Broadbent
d6730b40c9 Use \033 instead of \e for color codes, which seems to be more widely supported. 2012-10-23 13:44:02 +13:00
Andy Zhang
2ec1bf344f Add quotes to cd command in scm_breeze.sh to fix bash eval error 2012-10-12 02:31:55 -04:00
Nathan Broadbent
75e9a909a5 Revert "Changed _alias to alias_no_errors"
This reverts commit dba367d7f1.
2012-08-21 14:02:00 +12:00
Nathan Broadbent
dba367d7f1 Changed _alias to alias_no_errors 2012-08-21 12:28:15 +12:00
Nathan Broadbent
e58b98f3e9 Added command to update *.scmbrc files from latest commit. 2012-01-18 15:37:17 +08:00
Nathan Broadbent
b70ef4dba1 Added design() function to manage synchronization of design development assets for git repos, without checking them in 2011-10-22 01:54:14 +08:00
Nathan Broadbent
c1edcb9206 Fixed square brackets for zsh_compat and zsh_reset 2011-10-21 08:41:55 +08:00
Nathan Broadbent
4c42f5df56 Merge remote branch 'beef/master'
Conflicts:
	install.sh
	lib/scm_breeze.sh
2011-10-21 08:38:54 +08:00
Andrew Lorente
bf5d50fcb8 Remove restrictions on directory for scm-breeze
Previously the script had to be installed to ~/.scm_breeze. Now it can
live anywhere!
2011-10-20 11:27:31 -07:00
Trey Hunner
f9244d0f94 Remove bashisms from scm breeze update scripts 2011-10-20 10:51:03 -07:00
Dave Rigby
5b6e349b48 Fix _create_or_patch_scmbrc to work on OS X (10.7)
On OS X's version of mktemp the -t parameter is manditory -
see http://developer.apple.com/library/mac/#DOCUMENTATION/Darwin/Reference/ManPages/man1/mktemp.1.html
2011-10-19 20:30:22 +01:00
Nathan Broadbent
36c883e0d6 removed test 2011-10-19 18:20:39 +08:00
Nathan Broadbent
5d361590bb Fixed typo 2011-10-19 18:20:25 +08:00
Nathan Broadbent
ef2bd8a78d Added svn test 2011-10-19 18:19:58 +08:00
Nathan Broadbent
63491cd97f Updated install task, use shared function to create example scmbrc files 2011-10-19 18:19:29 +08:00
Nathan Broadbent
c77060a757 Removed test function 2011-10-19 18:13:48 +08:00
Nathan Broadbent
16f14291bf added test function 2011-10-19 18:13:24 +08:00
Nathan Broadbent
25d4d250cb reload SCM breeze after updating 2011-10-19 18:12:33 +08:00
Nathan Broadbent
c51b2934e0 Revert "Test that new scm can be added and rolled out"
This reverts commit 0dc8257ba2.
2011-10-19 18:10:47 +08:00
Nathan Broadbent
0dc8257ba2 Test that new scm can be added and rolled out 2011-10-19 18:09:46 +08:00
Nathan Broadbent
7328c32b9a Made update script load and run latest update code 2011-10-19 18:09:13 +08:00
Nathan Broadbent
72dec92d35 Reorganised code 2011-10-19 18:04:54 +08:00