You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's good to have descriptive variable names and values in the command line, but it's also useful to have their shorter counterparts available to save some typing.
So, we could accept fx (and/or ff), ch, ie, safor sth like that to mean firefox, chrome, internet explorer, safari
The text was updated successfully, but these errors were encountered:
But I would also like ffx for Firefox for instance.
In this case, since we can't foresee the habits of all the users, I guess it would be good to perform a fuzzy match to hit the collection of browsers from the user input. For that, a ranking with Levenshtein distances and a threshold minimum distance could do the trick. There are even npm modules to do the computations.
Hmm looks doable. It will have an added benefit of being able to type internet exploder for instance ;)
The current names + a few suggested ones could be embedded as bases.
If I type something nonsense like ww, it has same Levenshtein distance to ie and ch, then if multiple opts give the same distance, we just print out an error message, otherwise we select the closest one
If we get only one closest match, indeed we can choose it, and otherwise we log an error. But in some cases, if even the closest match has a too long distance, I would also log an error, since it loses its sense. Hence the idea of a threshold distance. Also we could log to the user which browser we selected. Anyway, the names are not too long, there are not so many and they are not too close, so there shouldn't be real problem, I'm just being perfectionist here :p
It's good to have descriptive variable names and values in the command line, but it's also useful to have their shorter counterparts available to save some typing.
So, we could accept
fx
(and/orff
),ch
,ie
,saf
or sth like that to mean firefox, chrome, internet explorer, safariThe text was updated successfully, but these errors were encountered: