Add direct jump feature - #69
Open
Sneethe wants to merge 3 commits into
Open
Conversation
Add feature per urbainvaes#53
Author
|
Just realized I should probably add this to the bash and fish scripts. (I forget they existed) |
Author
|
And if you don't want the first field (your mark) to be whats matched. |
akinomyoga
reviewed
Jul 7, 2025
| --select-1 \ | ||
| --tac) | ||
|
|
||
| [[ $FZF_MARKS_JUMP_EXACT_MATCH == 1 ]] && args+=(--bind=one:accept --query='"^"') |
Collaborator
There was a problem hiding this comment.
+= is bash >= 3.1. I think we should introduce a check for the Bash version.
| local delete_key=${FZF_MARKS_DELETE:-ctrl-d} paste_key=${FZF_MARKS_PASTE:-ctrl-v} | ||
| local lines=$(_fzm_color_marks < "${FZF_MARKS_FILE}" | eval ${FZF_MARKS_COMMAND} \ | ||
| --ansi \ | ||
| args=(--ansi \ |
Collaborator
There was a problem hiding this comment.
args should be localized.
Suggested change
| args=(--ansi \ | |
| local -a args | |
| args=(--ansi \ |
Note: There's also a bug with the form of local -a args=(...) in bash < 3.1.
| --query='"$*"' \ | ||
| --select-1 \ | ||
| --tac) | ||
| local args=(--ansi \ |
Collaborator
There was a problem hiding this comment.
local args=(...) also doesn't work in bash < 3.1. It would be equivalent to local args="(...)" in bash < 3.1.
Suggested change
| local args=(--ansi \ | |
| local -a args | |
| args=(--ansi \ |
|
|
||
| [[ $FZF_MARKS_JUMP_EXACT_MATCH == 1 ]] && args+=(--bind=one:accept --query='"^"') | ||
|
|
||
| local lines=$(_fzm_color_marks < "${FZF_MARKS_FILE}" | eval ${FZF_MARKS_COMMAND} ${args} ) |
Collaborator
There was a problem hiding this comment.
Suggested change
| local lines=$(_fzm_color_marks < "${FZF_MARKS_FILE}" | eval ${FZF_MARKS_COMMAND} ${args} ) | |
| local lines=$(_fzm_color_marks < "${FZF_MARKS_FILE}" | eval ${FZF_MARKS_COMMAND} ${args[@]} ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add feature per #53