Skip to content

Conversation

@DookTibs
Copy link
Contributor

@DookTibs DookTibs commented Mar 8, 2017

I often use grep/ack/ag with the "-l" switch to just list relevant files without listing exact line number matches. sack/sag displays good output with this switch, but the generated ~/.sack_shortcuts file causes problems in the create_shortcut_vim_cmd function. This change updates that function to check to see if line numbers are present in ~/.sack_shortcuts. If they are, it functions as before. If not, it launches Vim without a line number.

I didn't test this functionality with other editors, this just affects Vim users.

DookTibs added 2 commits March 8, 2017 16:59
…umbers

When running via -l to just list files that match without line numbers,
the "F *" commands didn't work properly. Update the shortcut command
to check to see if line numbers are present. If so, open starting at that
file. If not, just open the file.
"equals 2" fails if the filenames have spaces in them. change to "greaterthan/equal to 2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant