Closed ajm188 closed 8 years ago
This looks reasonable to me. Would need to cleanup the commits. =)
@zquestz cleaned up :)
Looks very complete (pun intended). @ajm188 :smile:
Thanks! If people open issues related to this, feel free to cc me
Awesome stuff. Thanks so much for the contribution!
Finding issues in the latest code. Here is what I am seeing.
quest@alucard ~/g/s/g/z/s> s -p facebook -cv
-cb (binary to launch search URI) -cl (list supported providers) -cs (launch web server)
-ck (path to key.pem for TLS) -cp (search provider (default "google")) -cv (display URL when opening)
If you tab after doing a 1 letter flag, it lists incorrect options.
Also error messages are pretty horrendous.
quest@alucard ~/g/s/g/z/s> s -p -c contains: Unknown option “-c”
~/.config/fish/completions/s.fish (line 8): if not contains $cmd[-1] (s -l)
^
in function “__fish_s_needs_option_argument”
called on standard input
with parameter list “-p”
in command substitution
called on standard input
contains -- test if a word is present in a list
Synopsis
contains [OPTIONS] KEY [VALUES...]
contains: Type “help contains” for related documentation
8tracks cplusplus google macports quora twitter
500px crunchyroll googleplus Makefile README.md unity3d
amazon digg hackernews mdn reddit upcloud
arstechnica diigo ietf msdn rottentomatoes vimeo
There may be a few bugs here, but you can start fixing this by calling contains
in the following way:
contains -- needle array
Notice the --
. If you don't write the --
, contains will assume that arguments starting with a dash are option flags and will incorrectly try to parse them.
Full completion support, as per discussion in #90. (will rebase and squash after "+1")
Copying in @bucaran, for any potential feedback.