File tree Expand file tree Collapse file tree 3 files changed +41
-4
lines changed Expand file tree Collapse file tree 3 files changed +41
-4
lines changed Original file line number Diff line number Diff line change 4
4
# shellcheck disable=SC2155
5
5
6
6
# ensure the command is run in a git repo
7
- source __assertgitrepo
8
- source __trim_escaped_quotes
7
+ source " ${CUSTOM_GIT_UTIL} " /__assertgitrepo
9
8
10
9
function main() {
11
10
@@ -33,7 +32,7 @@ function stage_selected_files() {
33
32
local file=" ${item# ${item: 0: 2} } " # remove prefix of length 2
34
33
fi
35
34
local rawFile=" $( getrawstr " ${file} " ) "
36
- git add " $( __trim_escaped_quotes " $ {rawFile}" ) "
35
+ git add " ${rawFile} "
37
36
done
38
37
}
39
38
@@ -43,7 +42,7 @@ if [[ $# -eq 0 ]]; then
43
42
fi
44
43
45
44
if [[ $# -eq 1 && ( " $* " == " ." || " $* " == " -A" ) ]]; then
46
- git add $*
45
+ git add " $* "
47
46
gstatus
48
47
exit 0
49
48
fi
Original file line number Diff line number Diff line change
1
+ # ----------------
2
+ # Setup custom-git
3
+ # ----------------
4
+
5
+ export CUSTOM_GIT_HOME=" ${HOME} " /.custom-git
6
+ export CUSTOM_CONSOLE_HOME=" ${CUSTOM_GIT_HOME} " /custom-console-bash
7
+
8
+ export __CUSTOM_GIT_UTIL=" $CUSTOM_GIT_HOME " /util
9
+ export __CUSTOM_CONSOLE_UTIL=" $CUSTOM_CONSOLE_HOME " /util
10
+
11
+ if [[ ! " $PATH " == * ${CUSTOM_GIT_HOME} /cmd* ]]; then
12
+ export PATH=" ${PATH: +${PATH} : }${CUSTOM_GIT_HOME} /cmd"
13
+ fi
14
+ if [[ ! " $PATH " == * ${CUSTOM_CONSOLE_HOME} /cmd* ]]; then
15
+ export PATH=" ${PATH: +${PATH} : }${CUSTOM_CONSOLE_HOME} /cmd"
16
+ fi
17
+
18
+ export FZF_DEFAULT_OPTS=" --reverse --border --ansi --preview-window wrap:down:70% --tabstop=4"
19
+ export FZF_DEFAULT_OPTS=" ${FZF_DEFAULT_OPTS} --color='preview-fg:-1'"
Original file line number Diff line number Diff line change
1
+ # ----------------
2
+ # Setup custom-git
3
+ # ----------------
4
+
5
+ export CUSTOM_GIT_HOME=" ${HOME} " /.custom-git
6
+ export CUSTOM_CONSOLE_HOME=" ${CUSTOM_GIT_HOME} " /custom-console-bash
7
+
8
+ export __CUSTOM_GIT_UTIL=" $CUSTOM_GIT_HOME " /util
9
+ export __CUSTOM_CONSOLE_UTIL=" $CUSTOM_CONSOLE_HOME " /util
10
+
11
+ if [[ ! " $PATH " == * ${CUSTOM_GIT_HOME} /cmd* ]]; then
12
+ export PATH=" ${PATH: +${PATH} : }${CUSTOM_GIT_HOME} /cmd"
13
+ fi
14
+ if [[ ! " $PATH " == * ${CUSTOM_CONSOLE_HOME} /cmd* ]]; then
15
+ export PATH=" ${PATH: +${PATH} : }${CUSTOM_CONSOLE_HOME} /cmd"
16
+ fi
17
+
18
+ export FZF_DEFAULT_OPTS=" --reverse --border --ansi --preview-window wrap:down:70% --tabstop=4"
19
+ export FZF_DEFAULT_OPTS=" ${FZF_DEFAULT_OPTS} --color='preview-fg:-1'"
You can’t perform that action at this time.
0 commit comments