set up fstash

pull/3/head
kevin zhuang 4 years ago
parent fd8d9bba51
commit f1418d7e6b

@ -36,8 +36,8 @@ case "$1" in
action_command='frm'
shift
;;
fpop)
action_command='fpop'
fstash)
action_command='fstash'
shift
;;
freset)

@ -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…
Cancel
Save