Skip to content
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
5 changes: 5 additions & 0 deletions .changeset/legal-maps-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@bomb.sh/tab': patch
---

Update package org to bomb.sh
4 changes: 2 additions & 2 deletions README.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Autocompletions are the solution to not break the user's flow. The issue is they
`my-cli.ts`:

```typescript
import t from '@bombsh/tab';
import t from '@bomb.sh/tab';

t.name('my-cli');

Expand Down Expand Up @@ -87,7 +87,7 @@ And that made us develop our own autocompletion abstraction over npm, pnpm and y
They'd only have to run this command once and inject it in their shell config.

```bash
npx @bombsh/tab pnpm zsh
npx @bomb.sh/tab pnpm zsh
```

These autocompletions on top of the normal autocompletions that these package managers provide are going to be way more powerful.
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Check out the [examples directory](./examples) for complete examples of using Ta
## Usage

```ts
import { Completion, script } from '@bombsh/tab';
import { Completion, script } from '@bomb.sh/tab';

const name = 'my-cli';
const completion = new Completion();
Expand Down Expand Up @@ -70,11 +70,11 @@ Now your user can run `source <(my-cli complete zsh)` and they will get completi

Since we are heavy users of tools like `cac` and `citty`, we have created adapters for both of them. Ideally, tab would be integrated internally into these tools, but for now, this is a good compromise.

### `@bombsh/tab/cac`
### `@bomb.sh/tab/cac`

```ts
import cac from 'cac';
import tab from '@bombsh/tab/cac';
import tab from '@bomb.sh/tab/cac';

const cli = cac('my-cli');

Expand Down Expand Up @@ -105,11 +105,11 @@ Now autocompletion will be available for any specified command and option in you

Suggestions are missing in the adapters since yet cac or citty do not have a way to provide suggestions (tab just came out!), we'd have to provide them manually. Mutations do not hurt in this situation.

### `@bombsh/tab/citty`
### `@bomb.sh/tab/citty`

```ts
import citty, { defineCommand, createMain } from 'citty';
import tab from '@bombsh/tab/citty';
import tab from '@bomb.sh/tab/citty';

const main = defineCommand({
meta: {
Expand Down Expand Up @@ -154,11 +154,11 @@ const cli = createMain(main);
cli();
```

### `@bombsh/tab/commander`
### `@bomb.sh/tab/commander`

```ts
import { Command } from 'commander';
import tab from '@bombsh/tab/commander';
import tab from '@bomb.sh/tab/commander';

const program = new Command('my-cli');
program.version('1.0.0');
Expand Down
4 changes: 2 additions & 2 deletions bin/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async function main() {
} else {
console.error(`Error: Expected '--' followed by command to complete`);
console.error(
`Example: ${packageManager} exec @bombsh/tab ${packageManager} complete -- command-to-complete`
`Example: ${packageManager} exec @bomb.sh/tab ${packageManager} complete -- command-to-complete`
);
process.exit(1);
}
Expand Down Expand Up @@ -74,7 +74,7 @@ async function main() {
// function generateCompletionScript(packageManager: string, shell: string) {
// const name = packageManager;
// const executable = process.env.npm_execpath
// ? `${packageManager} exec @bombsh/tab ${packageManager}`
// ? `${packageManager} exec @bomb.sh/tab ${packageManager}`
// : `node ${process.argv[1]} ${packageManager}`;
// script(shell as any, name, executable);
// }
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@bombsh/tab",
"name": "@bomb.sh/tab",
"version": "0.0.1",
"main": "./dist/t.js",
"types": "./dist/t.d.ts",
Expand Down
Loading