mirror of
https://github.com/wfxr/forgit.git
synced 2026-09-15 01:36:15 -04:00
Remove deferred execution in _forgit_stash_show
This commit is contained in:
parent
3010712ea7
commit
f17b7eefc0
|
|
@ -84,6 +84,16 @@ _forgit_yank_sha() {
|
|||
echo "$1" | _forgit_extract_sha | ${FORGIT_COPY_CMD:-pbcopy}
|
||||
}
|
||||
|
||||
# extract the first stash name in the input
|
||||
_forgit_extract_stash_name() {
|
||||
cut -d: -f1 | tr -d '[:space:]'
|
||||
}
|
||||
|
||||
# extract the first stash name and copy it to the clipboard
|
||||
_forgit_yank_stash_name() {
|
||||
echo "$1" | _forgit_extract_stash_name | ${FORGIT_COPY_CMD:-pbcopy}
|
||||
}
|
||||
|
||||
# parse a space separated string into an array
|
||||
# arrays parsed with this function are global
|
||||
_forgit_parse_array() {
|
||||
|
|
@ -382,7 +392,7 @@ _forgit_stash_show() {
|
|||
opts="
|
||||
$FORGIT_FZF_DEFAULT_OPTS
|
||||
+s +m -0 --tiebreak=index --bind=\"enter:execute($FORGIT stash_show_preview {} | $_forgit_enter_pager)\"
|
||||
--bind=\"ctrl-y:execute-silent(echo {} | cut -d: -f1 | tr -d '[:space:]' | ${FORGIT_COPY_CMD:-pbcopy})\"
|
||||
--bind=\"ctrl-y:execute-silent($FORGIT yank_stash_name {})\"
|
||||
--preview=\"$FORGIT stash_show_preview {}\"
|
||||
$FORGIT_STASH_FZF_OPTS
|
||||
"
|
||||
|
|
@ -940,6 +950,7 @@ private_commands=(
|
|||
"stash_push_preview"
|
||||
"stash_show_preview"
|
||||
"yank_sha"
|
||||
"yank_stash_name"
|
||||
"log_preview"
|
||||
"log_enter"
|
||||
"exec_diff"
|
||||
|
|
|
|||
Loading…
Reference in a new issue