Comments (12)
I'm not sure I understand what the error here is.
There is not a test:coverage
command. That is a valid error.
from yarn-completion.
It was autocompleted, for whatever reason. Notice that cov
was not offered, for example.
Also, nothing gets completed with just test:
.
from yarn-completion.
Oh, just figured out why coverage was completed, I have a folder named like that:
$ ls
coverage nest-cli.json package.json src tsconfig.build.json yarn.lock
dist node_modules README.md test tsconfig.json
$ touch x123
$ yarn run test:x<TAB>123 ^C
from yarn-completion.
Did you try the suggestion in the bottom of the readme?
from yarn-completion.
Just now (didn't notice it before). It behaves the same, only the options are presented differently. It would still complete coverage
, for example.
from yarn-completion.
Then yeah not sure I'm able to do anything about it. I tried looking into this in the past and came up short.
Happy to hear suggestions though.
from yarn-completion.
I've got package.json files with a similar convention and have found it not a big deal to do yarn t<Tab><Tab><Tab>
to get test:cov
completed.
from yarn-completion.
This looks related: https://stackoverflow.com/a/12495727/672885
from yarn-completion.
Already do that
yarn-completion/yarn-completion.bash
Line 1028 in 2821c67
from yarn-completion.
No, this specifically avoids redefining it, quote:
modifying COMP_WORDBREAKS in your completion script is not safe (as it is a global variable and it has the side effect of affecting the behavior of other completion scripts - for example scp).
Therefore, bash completion offers some helper methods which you can use to achieve your goal in a better and more safer way.
I've checked with Maven, which uses this and the difference is their completion escapes the character:
$ mvn <TAB><TAB>
assembly:assembly dependency:sources
clean dependency:tree
compile dependency:unpack
dependency:analyze dependency:unpack-dependencies
dependency:analyze-dep-mgt deploy
dependency:analyze-duplicate eclipse:eclipse
dependency:analyze-only idea:idea
dependency:analyze-report install
dependency:build-classpath package
dependency:copy plexus:app
dependency:copy-dependencies plexus:bundle-application
dependency:get plexus:bundle-runtime
dependency:go-offline plexus:descriptor
dependency:list plexus:runtime
dependency:properties plexus:service
dependency:purge-local-repository site
dependency:resolve test/
dependency:resolve-plugins verify
$ mvn depe<TAB>ndency\:<TAB>
dependency:analyze dependency:list
dependency:analyze-dep-mgt dependency:properties
dependency:analyze-duplicate dependency:purge-local-repository
dependency:analyze-only dependency:resolve
dependency:analyze-report dependency:resolve-plugins
dependency:build-classpath dependency:sources
dependency:copy dependency:tree
dependency:copy-dependencies dependency:unpack
dependency:get dependency:unpack-dependencies
dependency:go-offline
$ mvn dependency\:ana<TAB>lyze<TAB>
dependency:analyze dependency:analyze-only
dependency:analyze-dep-mgt dependency:analyze-report
dependency:analyze-duplicate
from yarn-completion.
Adding the backslash manually does work, I get test\:cov
completed correctly (but it again removes the backslash).
Escaping special chars like colons, spaced etc would probably fix it without other changes.
from yarn-completion.
Fixed in #48
from yarn-completion.
Related Issues (20)
- Feature request: support workspaces run through scripts HOT 3
- use package name instead of directory basename for workspace HOT 1
- How can we plug this into our own bash autocompletions? HOT 9
- Feature request: NPM repository autocomplete HOT 1
- Colon-contained completion glitches HOT 2
- Zsh support? HOT 6
- Version number error with 1.14.0? HOT 1
- Homebrew 0.14.0 upgrade issue HOT 1
- Tests are failing HOT 4
- Workspace package completion HOT 11
- Tests fail on latest yarn HOT 1
- Add it to bashit HOT 2
- Git-Bash completions HOT 2
- installing yarn completions under .local/share/bash-completion fails HOT 1
- Yarn v2/berry support ? HOT 3
- Excellent work HOT 1
- Fix build HOT 1
- Incorrect suggestion with script name with colon :
- Incorrect suggestion with script name with colon `:`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yarn-completion.