Skip to content
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

sag -g filename support #50

Open
premek opened this issue Jul 12, 2017 · 1 comment
Open

sag -g filename support #50

premek opened this issue Jul 12, 2017 · 1 comment

Comments

@premek
Copy link
Contributor

premek commented Jul 12, 2017

It would be nice to support this scenario.
Expected: to open a given file with F
Actual:

$ sag -g filename
sack__option is: -ag

============> running ag! <============

===> Current Profile: no_profile
===> Using flags: 
===> Searching under: /home/etc/etc
===> Searching parameters: -g filename


/home/etc/etc/filename
[1] 

$ F 1
sed: -e expression #1, char 10: unknown option to `s'

And it opens the editor in working directory

SnoringFrog added a commit to SnoringFrog/sack that referenced this issue Feb 12, 2020
Addresses issue sampson-chen#50 in the parent repo.

When there were no line numbers in results (e.g., sag -g), F would fail.
This switches from cutting based on space-delimited fields to simply
removing everything after the first non-alphanumeric character (I tried
to use \s instead of \W, but it didn't seem to work).
@SnoringFrog
Copy link

I realize this is quite an old issue by now, but my recent fork fixes this https://github.com/SnoringFrog/sack

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

No branches or pull requests

2 participants