-
Notifications
You must be signed in to change notification settings - Fork 43
Add direct jump feature #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Add feature per urbainvaes#53
|
Just realized I should probably add this to the bash and fish scripts. (I forget they existed) |
|
And if you don't want the first field (your mark) to be whats matched. |
| --select-1 \ | ||
| --tac) | ||
|
|
||
| [[ $FZF_MARKS_JUMP_EXACT_MATCH == 1 ]] && args+=(--bind=one:accept --query='"^"') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+= 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 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
args should be localized.
| 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 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local args=(...) also doesn't work in bash < 3.1. It would be equivalent to local args="(...)" in bash < 3.1.
| 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} ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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[@]} ) |
Add feature per #53