mirror of https://github.com/kazhala/dotbare
set up fstash
parent
fd8d9bba51
commit
f1418d7e6b
@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# stash operation using fzf
|
||||
#
|
||||
# @params
|
||||
# Globals
|
||||
# None
|
||||
# Arguments
|
||||
# None
|
||||
|
||||
set -e
|
||||
set -f
|
||||
|
||||
mydir="${0%/*}"
|
||||
source "${mydir}"/../helper/set_variable.sh
|
||||
source "${mydir}"/../helper/get_confirmation.sh
|
||||
source "${mydir}"/../helper/git_query.sh
|
||||
|
||||
function usage() {
|
||||
echo -e "Usage: dotbare fstash [-h] [-a] [-b] [-c] ...\n"
|
||||
echo -e "save/apply stash using fzf\n"
|
||||
echo -e "optional arguments:"
|
||||
echo -e " -h\t\tshow this help message and exit"
|
||||
}
|
||||
|
||||
stash_file=""
|
||||
|
||||
while getopts ":hf" opt; do
|
||||
case "$opt" in
|
||||
f)
|
||||
stash_file='true'
|
||||
;;
|
||||
h)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
selected_stash=$(get_stash)
|
||||
echo "${selected_stash}"
|
Loading…
Reference in New Issue