zquestz / s

Open a web search in your terminal.
MIT License
2.32k stars 114 forks source link

fixes for fish completion #90

Closed ajm188 closed 8 years ago

ajm188 commented 8 years ago

@bucaran, any idea why i couldn't combine the conditions on 7 and 8 with -a?

zquestz commented 8 years ago

Going to wait for @bucaran to take a look. Thanks for looking into this!

ajm188 commented 8 years ago

No problem! It drives me crazy when things don't work the way i expect them to

ghost commented 8 years ago

@owners Hey dudes. TBH if s was my own utility, I would use a simpler method like the one proposed earlier using only fish builtins. It would not be 100% perfect, but it's also a no-brainer and easier to maintain in the long run. @zquestz mentioned he does not use fish, so I wonder, who's going to maintain this code?

Sorry for being too preachy :sweat_smile:, but I guess that's one oddity that comes with age. In general, the PR looks alright and if @ajm188 is reporting good results then go for it.

ajm188 commented 8 years ago

@bucaran yeah, that makes sense. However, I would argue a few counter-points.

Even though I could say "I'm always available, just mention me on the PR!", with the best intentions, we all know how that can become not true over time, so I'm making these arguments assuming that I'm not around to dig into a problem.

ghost commented 8 years ago

You made some good counter-points. Worst case scenario, @zquestz can ping any of us, and chances are we might just be available :smile:

zquestz commented 8 years ago

Yeah was just using this and some of the behavior is not ideal, but none of it totally breaks it either. In an ideal world I would want:

Anything else would do nothing on tab, making sure auto complete never fires by accident for someone typing a search.

ajm188 commented 8 years ago

@zquestz that can definitely be done. I'll try to get a PR in sometime soon

ajm188 commented 8 years ago

@zquestz should --binary complete to anything in $PATH?

also, if I have more questions, should I just put them here, or open an issue and keep the discussion contained there?

zquestz commented 8 years ago

--binary should also be a full path.

ajm188 commented 8 years ago

Yeah, but it should be looking for any binaries that are in $PATH right?

So, for example, if PATH=/usr/bin:/usr/local/bin then if I type "foo", it should look for "/usr/bin/foo" and "/usr/local/bin/foo", but prefer the higher up part of the $PATH if it finds one. That seems like the correct behavior to me, but if you think otherwise, I'd rather hear it before I implement it :smile:

zquestz commented 8 years ago

I would just have it do normal autocompletion of directories and files (executable only if possible). Don't need to get fancy and look through the path.