Skip to content

Commit

Permalink
Changed _alias to alias_no_errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ndbroadbent committed Aug 21, 2012
1 parent 97b71f4 commit dba367d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions lib/git/aliases.sh
Expand Up @@ -35,7 +35,7 @@ function git(){
esac
}

_alias $git_alias='git'
alias_no_errors $git_alias='git'


# --------------------------------------------------------------------
Expand Down Expand Up @@ -73,14 +73,14 @@ __git_alias () {

# --------------------------------------------------------------------
# SCM Breeze functions
_alias $git_status_shortcuts_alias="git_status_shortcuts"
_alias $git_add_shortcuts_alias="git_add_shortcuts"
_alias $exec_scmb_expand_args_alias="exec_scmb_expand_args"
_alias $git_show_files_alias="git_show_affected_files"
_alias $git_commit_all_alias='git_commit_all'
alias_no_errors $git_status_shortcuts_alias="git_status_shortcuts"
alias_no_errors $git_add_shortcuts_alias="git_add_shortcuts"
alias_no_errors $exec_scmb_expand_args_alias="exec_scmb_expand_args"
alias_no_errors $git_show_files_alias="git_show_affected_files"
alias_no_errors $git_commit_all_alias='git_commit_all'

# Git Index alias
_alias $git_index_alias="git_index"
alias_no_errors $git_index_alias="git_index"

# Only set up the following aliases if 'git_setup_aliases' is 'yes'
if [ "$git_setup_aliases" = "yes" ]; then
Expand Down
8 changes: 4 additions & 4 deletions lib/git/branch_shortcuts.sh
Expand Up @@ -38,7 +38,7 @@ EOF
done
}

alias "$git_branch_alias"="exec_scmb_expand_args _scmb_git_branch_shortcuts"
alias "$git_branch_all_alias"="exec_scmb_expand_args _scmb_git_branch_shortcuts -a"
alias "$git_branch_move_alias"="exec_scmb_expand_args _scmb_git_branch_shortcuts -m"
alias "$git_branch_delete_alias"="exec_scmb_expand_args _scmb_git_branch_shortcuts -D"
alias_no_errors "$git_branch_alias"="exec_scmb_expand_args _scmb_git_branch_shortcuts"
alias_no_errors "$git_branch_all_alias"="exec_scmb_expand_args _scmb_git_branch_shortcuts -a"
alias_no_errors "$git_branch_move_alias"="exec_scmb_expand_args _scmb_git_branch_shortcuts -m"
alias_no_errors "$git_branch_delete_alias"="exec_scmb_expand_args _scmb_git_branch_shortcuts -D"
2 changes: 1 addition & 1 deletion lib/scm_breeze.sh
Expand Up @@ -10,7 +10,7 @@ enable_nullglob() { if [ $shell = "zsh" ]; then setopt NULL_GLOB; else shopt
disable_nullglob() { if [ $shell = "zsh" ]; then unsetopt NULL_GLOB; else shopt -u nullglob; fi; }

# Alias wrapper that ignores errors if alias is not defined.
_alias(){ alias "$@" 2> /dev/null; }
alias_no_errors(){ alias "$@" 2> /dev/null; }


# Updates SCM Breeze from GitHub.
Expand Down

3 comments on commit dba367d

@interhive
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting the following errors upon opening terminal following this commit:

_arguments:comparguments:312: can only be called from completion function
_arguments:comparguments:312: can only be called from completion function
_arguments:comparguments:312: can only be called from completion function
_arguments:comparguments:312: can only be called from completion function
_arguments:comparguments:312: can only be called from completion function
_arguments:comparguments:312: can only be called from completion function
_arguments:comparguments:312: can only be called from completion function
_arguments:comparguments:312: can only be called from completion function
_arguments:comparguments:312: can only be called from completion function

I'm on OS X 10.8 (Mountain Lion) running ZSH as my shell.

@ndbroadbent
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I've reverted this commit, but not sure why it would cause that error

@interhive
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that the error did go away upon reverting this commit.

Please sign in to comment.