Skip to content

Commit

Permalink
Re-add bash implementation
Browse files Browse the repository at this point in the history
See pull request #41.
  • Loading branch information
urbainvaes committed Dec 28, 2020
1 parent b0ff00d commit fbb5aac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fzf-marks.plugin.bash
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function _color_marks {
function fzm {
lines=$(_color_marks < "${FZF_MARKS_FILE}" | eval ${FZF_MARKS_COMMAND} \
--ansi \
--expect="${FZF_MARKS_DELETE:-ctrl-d}" \
--expect="${FZF_MARKS_DELETE:-ctrl-d},${FZM_MARKS_PASTE:-ctrl-k}" \
--multi \
--bind=ctrl-y:accept,ctrl-t:toggle \
--query="\"$*\"" \
Expand All @@ -106,6 +106,9 @@ function fzm {

if [[ $key == "${FZF_MARKS_DELETE:-ctrl-d}" ]]; then
dmark "-->-->-->" "$(sed 1d <<< "$lines")"
elif [[ $key == "${FZF_MARKS_PASTE:-ctrl-k}" ]]; then
directory=$(tail -1 <<< "$lines" | sed 's/.*: \(.*\)$/\1/' | sed "s#^~#${HOME}#")
echo $directory
else
jump "-->-->-->" "$(tail -1 <<< "${lines}")"
fi
Expand Down

0 comments on commit fbb5aac

Please sign in to comment.