Better shared variable name.

This commit is contained in:
Nathan Broadbent
2011-10-18 00:36:36 +08:00
parent 8c95162bc6
commit acd8e42ee9
5 changed files with 20 additions and 19 deletions

View File

@@ -8,5 +8,5 @@ zsh_reset(){ if [[ $shell == "zsh" && -z $zsh_shwordsplit ]]; then unsetopt shw
# Update SCM Breeze from GitHub # Update SCM Breeze from GitHub
update_scm_breeze() { $(cd "$scmbreezeDir"; git pull origin master); } update_scm_breeze() { $(cd "$scmbDir"; git pull origin master); }

View File

@@ -18,7 +18,7 @@
# -------------------------------------------------------------------- # --------------------------------------------------------------------
git_status_shortcuts() { git_status_shortcuts() {
# Run ruby script, store output # Run ruby script, store output
cmd_output=$(/usr/bin/env ruby "$scmbreezeDir/lib/git/status_shortcuts.rb" $@) cmd_output=$(/usr/bin/env ruby "$scmbDir/lib/git/status_shortcuts.rb" $@)
if [[ -z "$cmd_output" ]]; then if [[ -z "$cmd_output" ]]; then
# Just show regular git status if ruby script returns nothing. # Just show regular git status if ruby script returns nothing.
git status; return 1 git status; return 1

View File

@@ -2,7 +2,7 @@
# scm_breeze.sh must be sourced, and not executed in a sub-shell. # scm_breeze.sh must be sourced, and not executed in a sub-shell.
# e.g "source ~/.scm_breeze/scm_breeze.sh" # e.g "source ~/.scm_breeze/scm_breeze.sh"
# ------------------------------------------------------------ # ------------------------------------------------------------
export scmbreezeDir="$(dirname ${BASH_SOURCE:-$0})" export scmbDir="$(dirname ${BASH_SOURCE:-$0})"
# Git # Git
@@ -11,16 +11,16 @@ if [[ -s "$HOME/.git.scmbrc" ]]; then
# Load config # Load config
. "$HOME/.git.scmbrc" . "$HOME/.git.scmbrc"
. "$scmbreezeDir/lib/_shared.sh" . "$scmbDir/lib/_shared.sh"
. "$scmbreezeDir/lib/git/aliases_and_bindings.sh" . "$scmbDir/lib/git/aliases_and_bindings.sh"
. "$scmbreezeDir/lib/git/status_shortcuts.sh" . "$scmbDir/lib/git/status_shortcuts.sh"
. "$scmbreezeDir/lib/git/repo_management.sh" . "$scmbDir/lib/git/repo_management.sh"
. "$scmbreezeDir/lib/git/tools.sh" . "$scmbDir/lib/git/tools.sh"
if ! type ruby > /dev/null 2>&1; then if ! type ruby > /dev/null 2>&1; then
# If Ruby is not installed, fall back to the # If Ruby is not installed, fall back to the
# slower bash/zsh implementation of 'git_status_shortcuts' # slower bash/zsh implementation of 'git_status_shortcuts'
. "$scmbreezeDir/lib/git/fallback/status_shortcuts_shell.sh" . "$scmbDir/lib/git/fallback/status_shortcuts_shell.sh"
fi fi
fi fi

View File

@@ -7,17 +7,17 @@
# #
# Unit tests for git shell scripts # Unit tests for git shell scripts
thisDir="$( cd -P "$( dirname "$0" )" && pwd )" scmbDir="$( cd -P "$( dirname "$0" )" && pwd )"
# Zsh compatibility # Zsh compatibility
if [ -n "${ZSH_VERSION:-}" ]; then shell="zsh"; SHUNIT_PARENT=$0; setopt shwordsplit; fi if [ -n "${ZSH_VERSION:-}" ]; then shell="zsh"; SHUNIT_PARENT=$0; setopt shwordsplit; fi
# Load test helpers # Load test helpers
. "$thisDir/../../support/test_helper" . "$scmbDir/../../support/test_helper"
# Load functions to test # Load functions to test
. "$thisDir/../../../lib/_shared.sh" . "$scmbDir/../../../lib/_shared.sh"
. "$thisDir/../../../lib/git/repo_management.sh" . "$scmbDir/../../../lib/git/repo_management.sh"
# Setup and tear down # Setup and tear down
@@ -181,5 +181,5 @@ test_git_repo_tab_completion() {
# load and run shUnit2 # load and run shUnit2
# Call this function to run tests # Call this function to run tests
. "$thisDir/../../support/shunit2" . "$scmbDir/../../support/shunit2"

View File

@@ -7,17 +7,18 @@
# #
# Unit tests for git shell scripts # Unit tests for git shell scripts
thisDir="$( cd -P "$( dirname "$0" )" && pwd )" scmbDir="$( cd -P "$( dirname "$0" )" && pwd )"
# Zsh compatibility # Zsh compatibility
if [ -n "${ZSH_VERSION:-}" ]; then shell="zsh"; SHUNIT_PARENT=$0; setopt shwordsplit; fi if [ -n "${ZSH_VERSION:-}" ]; then shell="zsh"; SHUNIT_PARENT=$0; setopt shwordsplit; fi
# Load test helpers # Load test helpers
. "$thisDir/../../support/test_helper" . "$scmbDir/../../support/test_helper"
# Load functions to test # Load functions to test
. "$thisDir/../../../lib/_shared.sh" . "$scmbDir/../../../lib/_shared.sh"
. "$thisDir/../../../lib/git/status_shortcuts.sh" . "$scmbDir/../../../lib/git/status_shortcuts.sh"
# Setup and tear down # Setup and tear down
@@ -251,5 +252,5 @@ test_git_commit_prompt() {
# load and run shUnit2 # load and run shUnit2
. "$thisDir/../../support/shunit2" . "$scmbDir/../../support/shunit2"