File tree 5 files changed +92
-0
lines changed
5 files changed +92
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ gbranchcreate
6
6
gcommit
7
7
gdiff
8
8
gshow
9
+ gstashapply
9
10
gswitch
10
11
header
11
12
init
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # shellcheck disable=SC1091 # Not following: ./__assertgitrepo was not specified as input
4
+ # shellcheck disable=SC2155 # Declare and assign separately to avoid masking return values
5
+
6
+ source " ${__CUSTOM_GIT_UTIL} " /fzf_headers/__gstash_header
7
+ source " ${__CUSTOM_GIT_UTIL} " /__assertgitrepo
8
+ source " ${__CUSTOM_GIT_UTIL} " /__select_stash_id
9
+
10
+ __assertgitrepo
11
+
12
+ function main() {
13
+
14
+ local GSTASH_HEADER=" $( __gstash_header " drop" ) "
15
+
16
+ local stashId=" $( __select_stash_id " ${GSTASH_HEADER} " ) "
17
+ [ -z " ${stashId} " ] && return
18
+
19
+ git stash drop " ${stashId} "
20
+ }
21
+
22
+ main
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # shellcheck disable=SC1091 # Not following: ./__assertgitrepo was not specified as input
4
+ # shellcheck disable=SC2155 # Declare and assign separately to avoid masking return values
5
+
6
+ source " ${__CUSTOM_GIT_UTIL} " /fzf_headers/__gstashlist_header
7
+ source " ${__CUSTOM_GIT_UTIL} " /__assertgitrepo
8
+
9
+ __assertgitrepo
10
+
11
+ function main() {
12
+
13
+ local GSTASHLIST_HEADER=" $( __gstashlist_header) "
14
+
15
+ git stash list | \
16
+ fzf --bind ' ?:toggle-preview' \
17
+ --bind ' enter:' \
18
+ --bind ' double-click:' \
19
+ --header " ${GSTASHLIST_HEADER} " \
20
+ --preview " source ${__CUSTOM_GIT_UTIL} /fzf_previews/__gstash_preview; __gstash_preview {}"
21
+
22
+ }
23
+
24
+ main
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # shellcheck disable=SC1091 # Not following: ./__assertgitrepo was not specified as input
4
+ # shellcheck disable=SC2155 # Declare and assign separately to avoid masking return values
5
+
6
+ source " ${__CUSTOM_GIT_UTIL} " /fzf_headers/__gstash_header
7
+ source " ${__CUSTOM_GIT_UTIL} " /__assertgitrepo
8
+ source " ${__CUSTOM_GIT_UTIL} " /__select_stash_id
9
+
10
+ __assertgitrepo
11
+
12
+ function main() {
13
+
14
+ local GSTASH_HEADER=" $( __gstash_header " pop" ) "
15
+
16
+ local stashId=" $( __select_stash_id " ${GSTASH_HEADER} " ) "
17
+ [ -z " ${stashId} " ] && return
18
+
19
+ git stash pop " ${stashId} "
20
+ }
21
+
22
+ main
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # shellcheck disable=SC1091
4
+ # shellcheck disable=SC2001
5
+ # shellcheck disable=SC2155
6
+
7
+ source " $__CUSTOM_CONSOLE_UTIL " /__common
8
+
9
+ function __gstashlist_header() {
10
+
11
+ local msg=" gstashlist | ?: toggle preview | esc: exit"
12
+ local colorMsg=" ${UNDERLINE}${MAGENTA} gstashlist${RESET} | \
13
+ ${BLUE} ?:${RESET} toggle preview | \
14
+ ${BLUE} esc:${RESET} exit"
15
+
16
+ local edge=" $( echo " ${msg} " | sed -e ' s/./-/g' ) "
17
+ local GSTASHLIST_HEADER=" ${edge} " '
18
+ ' " ${colorMsg} " '
19
+ ' " ${edge} " '
20
+ '
21
+
22
+ echo " ${GSTASHLIST_HEADER} "
23
+ }
You can’t perform that action at this time.
0 commit comments