File tree Expand file tree Collapse file tree 6 files changed +637
-11
lines changed
vendor/github.com/ohmyzsh/ohmyzsh Expand file tree Collapse file tree 6 files changed +637
-11
lines changed Original file line number Diff line number Diff line change 1+ # shellcheck shell=bash
2+ cite ' about-alias'
3+ about-alias ' git aliases from oh-my-zsh (incompatible with regular git aliases option)'
4+
5+ if _bash-it-component-item-is-enabled aliases git; then
6+ _log_warning " git-omz aliases are incompatible with regular git aliases"
7+ return 1
8+ fi
9+
10+ # Load after regular git aliases
11+ # BASH_IT_LOAD_PRIORITY: 160
12+
13+ # Setup git version
14+ read -ra git_version_arr <<< " $(git version 2> /dev/null)"
15+ git_version=" ${git_version_arr[2]} "
16+
17+ # Setup is-at-least
18+ function is-at-least {
19+ local expected_version=$1
20+ local actual_version=$2
21+ local versions
22+
23+ printf -v versions ' %s\n%s' " $expected_version " " $actual_version "
24+ [[ $versions = " $( sort -V <<< " $versions" ) " ]]
25+ }
26+
27+ # Setup git_current_branch
28+ function git_current_branch {
29+ _git-branch
30+ }
31+
32+ # shellcheck disable=SC1090
33+ source " ${BASH_IT} " /vendor/github.com/ohmyzsh/ohmyzsh/plugins/git/git.plugin.zsh
Original file line number Diff line number Diff line change 11# shellcheck shell=bash
22about-alias ' common git abbreviations'
33
4+ # We can use this variable to make sure that we don't accidentally clash with git-zsh aliases
5+ if _bash-it-component-item-is-enabled aliases git-omz; then
6+ _log_warning " The aliases from 'git' and from 'git-omz' conflict with each other; please only enable one."
7+ return 1
8+ fi
9+
410alias g=' git'
511alias get=' git'
612alias got=' git '
Original file line number Diff line number Diff line change @@ -18,17 +18,26 @@ function local_setup() {
1818}
1919
2020@test " search: git" {
21- local plugin completion
22- run _bash-it-search ' git' --no-color
23- assert_success
24- assert_line -n 0 ' aliases: git gitsvn '
25- assert_line -n 1 -p ' plugins:'
26- for plugin in " autojump" " git" " gitstatus" " git-subrepo" " jgitflow" " jump" ; do
27- assert_line -n 1 -p " $plugin "
28- done
29- for completion in " git" " git_flow" " git_flow_avh" " github-cli" ; do
30- assert_line -n 2 -p " $completion "
31- done
21+ local plugin completion
22+ run _bash-it-search ' git' --no-color
23+
24+ assert_line -n 0 -p ' aliases:'
25+ assert_success
26+ for alias in ' git' ' gitsvn' ' git-omz'
27+ do
28+ echo $alias
29+ assert_line -n 0 -p $alias
30+ done
31+
32+ assert_line -n 1 -p ' plugins:'
33+ for plugin in " autojump" " git" " gitstatus" " git-subrepo" " jgitflow" " jump"
34+ do
35+ assert_line -n 1 -p " $plugin "
36+ done
37+ for completion in " git" " git_flow" " git_flow_avh" " github-cli"
38+ do
39+ assert_line -n 2 -p " $completion "
40+ done
3241}
3342
3443@test " search: ruby gem bundle rake rails" {
You can’t perform that action at this time.
0 commit comments