DefinitelyTyped / tsd

[DEPRECATED] TypeScript Definition manager for DefinitelyTyped
Apache License 2.0
1.12k stars 135 forks source link

Fix CLI query on Max etc #62

Open Bartvds opened 10 years ago

Bartvds commented 10 years ago

https://github.com/DefinitelyTyped/tsd/pull/61

$ tsd query *

Should be:

$ tsd query "*"
$ tsd query
vvakame commented 10 years ago

bad news... i found a new fact.

$ tsd query angular* --resolve zsh: no matches found: angular $ tsd query "angular" --resolve ... this is works fine! ...

Mac user expect to $ tsd query angular same as $ tsd query "*" | grep angular. for example. $ bower search angular found a some result. $ bower search angular | wc 883 1764 65264

Bartvds commented 10 years ago

Thanks, I'll try to improve that next.

Bartvds commented 10 years ago

I've thought about this, but it is weird:

If $ tsd query angular would return anything with 'angular' in the name (the plugins), then how do you select only the main angular.d.ts ?

vvakame commented 10 years ago

in npm $ npm search clean ....loooooong result.... grunt-bower-clean Remove files (e.g. docs, tests, etc.) from installed bower… =karolis 2013-10-26 0.2.1 gruntplugin grunt-clean Removes previously generated files and directories. =maxbeatty… 2013-01-28 0.4.0 gruntplugin ....loooooong result.... $ npm install grunt-clean --save

proposal. in tsd.. $ tsd query angular ...looong result... $ tsd install angularjs/angular-mocks --resolve --save

more than one behavior in 1 sub command with contextual uses. i think it cause confusion.

i think same issue in --info options. it is in npm $ npm search typescript $ npm info tsd

Bartvds commented 10 years ago

$ tsd query angularjs $ tsd install angularjs/angular-mocks --resolve --save

Sort-of. The thing with $ tsd query is that it is meant for working with non-precise module names and globbing (so many weird names in the repo) , and use filters etc (like really querying). I had the $tsd install/search thing earlier but moved to this --action thing because it was more convenient.

I have lack of simpler install is in this issue: https://github.com/DefinitelyTyped/tsd/issues/52

I don't like $ tsd install jquery.somePlugin/jquery.somePlugin --resolve --save

I want: $ tsd install jquery.somePlugin --resolve --save

It relates to meta-data thing https://github.com/borisyankov/DefinitelyTyped/issues/1556. And/or a test in the build script that makes sure no project can have same definition names. (eg: fail if jquery/jquery.d.ts and foobar/jquery.d.ts). See https://github.com/borisyankov/DefinitelyTyped/issues/1565, https://github.com/borisyankov/DefinitelyTyped/issues/1566,

Once we fix that I do a install/search like npm, bower etc

vvakame commented 10 years ago

one more. I want tsd accept this syntax. tsd install angular-mocks mocha expectations --resolve --save. I think it's useful to be able to specify multiple module.

Bartvds commented 10 years ago

Sure, multiple modules install will definitely work (old TSD had it too).

Note: it already does for current query model.

vvakame commented 10 years ago

Thank you I did not know!

now

>> main

   query <pattern>            search definitions using globbing pattern

improvement plan

>> main

   query <pattern> [<...patterns>]            search definitions using globbing pattern

what is this notation syntax name? how to write the variable arguments?

Bartvds commented 10 years ago

Oops, my bad! I should clarify this in the next readme / help.

For usage just stack the name selector:

$ tsd query d3 angular jquery --resolve
vvakame commented 10 years ago

:+1: