File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33# shellcheck disable=SC1091 # Not following: ./__assertgitrepo was not specified as input
44# shellcheck disable=SC2155 # Declare and assign separately to avoid masking return values
55
6- source " ${__CUSTOM_GIT_UTIL} " /fzf_headers/__gstash_header
6+ source " ${__CUSTOM_GIT_UTIL} " /fzf_headers/gstash/ __gstash_header
77source " ${__CUSTOM_GIT_UTIL} " /__assertgitrepo
88source " ${__CUSTOM_GIT_UTIL} " /__select_stash_id
99
Original file line number Diff line number Diff line change 33# shellcheck disable=SC1091 # Not following: ./__assertgitrepo was not specified as input
44# shellcheck disable=SC2155 # Declare and assign separately to avoid masking return values
55
6- source " ${__CUSTOM_GIT_UTIL} " /fzf_headers/__gstash_header
6+ source " ${__CUSTOM_GIT_UTIL} " /fzf_headers/gstash/ __gstash_header
77source " ${__CUSTOM_GIT_UTIL} " /__assertgitrepo
88source " ${__CUSTOM_GIT_UTIL} " /__select_stash_id
99
Original file line number Diff line number Diff line change 33# shellcheck disable=SC1091 # Not following: ./__assertgitrepo was not specified as input
44# shellcheck disable=SC2155 # Declare and assign separately to avoid masking return values
55
6- source " ${__CUSTOM_GIT_UTIL} " /fzf_headers/__gstash_header
6+ source " ${__CUSTOM_GIT_UTIL} " /fzf_headers/gstash/ __gstash_header
77source " ${__CUSTOM_GIT_UTIL} " /__assertgitrepo
88source " ${__CUSTOM_GIT_UTIL} " /__select_stash_id
99
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} " /__assertgitrepo
7+ source " ${__CUSTOM_GIT_UTIL} " /fzf_headers/gstash/__description_header
8+
9+ __assertgitrepo
10+
11+ function main() {
12+
13+ stashDescription=" $( get_stash_description) "
14+ [ -z " ${stashDescription} " ] && return
15+
16+ git stash save -u -k " ${stashDescription} "
17+ gstashlist
18+ gstatus
19+ }
20+
21+ function get_stash_description() {
22+
23+ local GSTASH_DESCRIPTION_HEADER=" $( __description_header) "
24+ local stashDescription=" $( echo " " | grep " x" | \
25+ fzf --height 10%\
26+ --info=hidden\
27+ --bind ' enter:print-query' \
28+ --header " ${GSTASH_DESCRIPTION_HEADER} " ) "
29+ echo " ${stashDescription} "
30+ }
31+
32+ main
33+
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # shellcheck disable=SC1091 # Not following: ./__common was not specified as input
4+
5+ source " $__CUSTOM_CONSOLE_UTIL " /__common
6+
7+ function __description_header() {
8+
9+ local colorMsg=" Write a short description\n\n"
10+ colorMsg=" ${colorMsg}${BLUE} esc:${RESET} exit"
11+
12+ local edge=" ----------------------------------------------------"
13+ local GSTASH_DESCRIPTION_HEADER=" ${edge} \n${colorMsg} \n "
14+
15+ echo -e " ${GSTASH_DESCRIPTION_HEADER} "
16+ }
File renamed without changes.
You can’t perform that action at this time.
0 commit comments