Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve help of patterns to mention the filter-by-state #8633

Merged
merged 2 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions scopes/component/remove/remove-cmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ export class RemoveCmd implements Command {
['s', 'silent', 'skip confirmation'],
] as CommandOptions;
loader = true;
examples = [
{
cmd: 'remove "$deprecated"',
description: 'remove all components that are deprecated',
},
];
remoteOp = true;

constructor(private remove: RemoveMain, private workspace?: Workspace) {}
Expand Down
2 changes: 2 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,12 +542,14 @@ export const WILDCARD_HELP = (command: string) =>
export const PATTERN_HELP = (command: string) =>
`you can use a \`<pattern>\` for multiple component ids, such as \`bit ${command} "org.scope/utils/**"\`.
use comma to separate patterns and '!' to exclude. e.g. 'ui/**, !ui/button'
use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'.
always wrap the pattern with single quotes to avoid collision with shell commands.
use \`bit pattern --help\` to understand patterns better and \`bit pattern <pattern>\` to validate the pattern.
`;

export const COMPONENT_PATTERN_HELP = `component name, component id, or component pattern. use component pattern to select multiple components.
wrap the pattern with quotes. use comma to separate patterns and "!" to exclude. e.g. "ui/**, !ui/button".
use '$' prefix to filter by states/attributes, e.g. '$deprecated', '$modified' or '$env:teambit.react/react'.
use \`bit pattern --help\` to understand patterns better and \`bit pattern <pattern>\` to validate the pattern.`;

export const CURRENT_UPSTREAM = 'current';
Expand Down