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
86 changes: 24 additions & 62 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ $ npm install -g @hackmd/hackmd-cli
$ hackmd-cli COMMAND
running command...
$ hackmd-cli (--version|-v)
@hackmd/hackmd-cli/2.3.1 darwin-arm64 node-v18.14.2
@hackmd/hackmd-cli/2.3.2 darwin-arm64 node-v18.14.2
$ hackmd-cli --help [COMMAND]
USAGE
$ hackmd-cli COMMAND
Expand Down Expand Up @@ -97,9 +97,7 @@ All available configurations are listed in the table below.
## Commands

<!-- commands -->
* [`hackmd-cli completion`](#hackmd-cli-completion)
* [`hackmd-cli completion generate`](#hackmd-cli-completion-generate)
* [`hackmd-cli completion generate alias ALIAS`](#hackmd-cli-completion-generate-alias-alias)
* [`hackmd-cli autocomplete [SHELL]`](#hackmd-cli-autocomplete-shell)
* [`hackmd-cli export`](#hackmd-cli-export)
* [`hackmd-cli help [COMMANDS]`](#hackmd-cli-help-commands)
* [`hackmd-cli history`](#hackmd-cli-history)
Expand All @@ -117,73 +115,37 @@ All available configurations are listed in the table below.
* [`hackmd-cli version`](#hackmd-cli-version)
* [`hackmd-cli whoami`](#hackmd-cli-whoami)

## `hackmd-cli completion`
## `hackmd-cli autocomplete [SHELL]`

Generate shell completion script
display autocomplete installation instructions

```
USAGE
$ hackmd-cli completion -s bash|fish|zsh
$ hackmd-cli autocomplete [SHELL] [-r]

FLAGS
-s, --shell=<option> (required) Name of shell
<options: bash|fish|zsh>

DESCRIPTION
Generate shell completion script

Run this command to see instructions for your shell.

EXAMPLES
$ hackmd-cli completion --shell zsh
```

_See code: [oclif-plugin-completion](https://github.com/MunifTanjim/oclif-plugin-completion/blob/0.6.0/src/commands/completion/index.ts)_

## `hackmd-cli completion generate`

Generates completion script

```
USAGE
$ hackmd-cli completion generate -s bash|fish|zsh
ARGUMENTS
SHELL shell type

FLAGS
-s, --shell=<option> (required) Name of shell
<options: bash|fish|zsh>
-r, --refresh-cache Refresh cache (ignores displaying instructions)

DESCRIPTION
Generates completion script

Run the "completion" command to see instructions about how to use the script generated by this command.
display autocomplete installation instructions

EXAMPLES
$ hackmd-cli completion:generate --shell zsh
```
$ hackmd-cli autocomplete

## `hackmd-cli completion generate alias ALIAS`
$ hackmd-cli autocomplete bash

Generates completion script for alias
$ hackmd-cli autocomplete fish

```
USAGE
$ hackmd-cli completion generate alias ALIAS -s bash|fish

ARGUMENTS
ALIAS name of the alias
$ hackmd-cli autocomplete zsh

FLAGS
-s, --shell=<option> (required) Name of shell
<options: bash|fish>

DESCRIPTION
Generates completion script for alias

This needs the completion script for the main command to be present.

Check the "completion:generate" command.
$ hackmd-cli autocomplete --refresh-cache
```

_See code: [@hackmd/oclif-plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v2.1.9-fish/src/commands/autocomplete/index.ts)_

## `hackmd-cli export`

Export note content
Expand All @@ -204,7 +166,7 @@ EXAMPLES
# A note to be exported
```

_See code: [src/commands/export.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.3.1/src/commands/export.ts)_
_See code: [src/commands/export.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.3.2/src/commands/export.ts)_

## `hackmd-cli help [COMMANDS]`

Expand Down Expand Up @@ -258,7 +220,7 @@ EXAMPLES
BnC6gN0_TfStV2KKmPPXeg Welcome to your team's workspace null CLI-test
```

_See code: [src/commands/history.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.3.1/src/commands/history.ts)_
_See code: [src/commands/history.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.3.2/src/commands/history.ts)_

## `hackmd-cli login`

Expand All @@ -280,7 +242,7 @@ EXAMPLES
Login successfully
```

_See code: [src/commands/login.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.3.1/src/commands/login.ts)_
_See code: [src/commands/login.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.3.2/src/commands/login.ts)_

## `hackmd-cli logout`

Expand All @@ -301,7 +263,7 @@ EXAMPLES
You've logged out successfully
```

_See code: [src/commands/logout.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.3.1/src/commands/logout.ts)_
_See code: [src/commands/logout.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.3.2/src/commands/logout.ts)_

## `hackmd-cli notes`

Expand Down Expand Up @@ -335,7 +297,7 @@ EXAMPLES
raUuSTetT5uQbqQfLnz9lA CLI test note gvfz2UB5THiKABQJQnLs6Q null
```

_See code: [src/commands/notes/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.3.1/src/commands/notes/index.ts)_
_See code: [src/commands/notes/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.3.2/src/commands/notes/index.ts)_

## `hackmd-cli notes create`

Expand Down Expand Up @@ -452,7 +414,7 @@ EXAMPLES
BnC6gN0_TfStV2KKmPPXeg Welcome to your team's workspace null CLI-test
```

_See code: [src/commands/team-notes/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.3.1/src/commands/team-notes/index.ts)_
_See code: [src/commands/team-notes/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.3.2/src/commands/team-notes/index.ts)_

## `hackmd-cli team-notes create`

Expand Down Expand Up @@ -569,7 +531,7 @@ EXAMPLES
f76308a6-d77a-41f6-86d0-8ada426a6fb4 CLI test team CLI-test 82f7f3d9-4079-4c78-8a00-14094272ece9
```

_See code: [src/commands/teams.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.3.1/src/commands/teams.ts)_
_See code: [src/commands/teams.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.3.2/src/commands/teams.ts)_

## `hackmd-cli version`

Expand Down Expand Up @@ -622,7 +584,7 @@ EXAMPLES
82f7f3d9-4079-4c78-8a00-14094272ece9 Ming-Hsiu Tsai null gvfz2UB5THiKABQJQnLs6Q
```

_See code: [src/commands/whoami.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.3.1/src/commands/whoami.ts)_
_See code: [src/commands/whoami.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.3.2/src/commands/whoami.ts)_
<!-- commandsstop -->

## License
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"name": "@hackmd/hackmd-cli",
"version": "2.3.1",
"version": "2.3.2",
"author": "HackMD Team",
"bin": {
"hackmd-cli": "./bin/run"
},
"bugs": "https://github.com/hackmdio/hackmd-cli/issues",
"dependencies": {
"@hackmd/api": "^2.0.0",
"@hackmd/oclif-plugin-autocomplete": "^2.1.9-fish",
"@oclif/core": "2.8.2",
"@oclif/plugin-help": "5.2.9",
"@oclif/plugin-version": "1.3.3",
"cli-ux": "^5.4.4",
"fs-extra": "^8.1.0",
"lodash.defaults": "^4.2.0",
"oclif": "3.8.1",
"oclif-plugin-completion": "^0.6.0",
"tslib": "^2.5.0"
},
"devDependencies": {
Expand Down Expand Up @@ -65,7 +65,7 @@
"plugins": [
"@oclif/plugin-help",
"@oclif/plugin-version",
"oclif-plugin-completion"
"@hackmd/oclif-plugin-autocomplete"
]
},
"repository": "hackmdio/hackmd-cli",
Expand Down
10 changes: 10 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,16 @@
axios "^0.25.0"
tslib "^1.14.1"

"@hackmd/oclif-plugin-autocomplete@^2.1.9-fish":
version "2.1.9-fish"
resolved "https://registry.yarnpkg.com/@hackmd/oclif-plugin-autocomplete/-/oclif-plugin-autocomplete-2.1.9-fish.tgz#5af99258791014fcefbb6fe547c5e9436e686eb1"
integrity sha512-wLiROF31bABA+Q9+blweBfythR6HuUANsdYql+MJNb+R1Z6/JJvyHvtAfA6u+mcT4quLJeU5xZ0timWgfDkhlw==
dependencies:
"@oclif/core" "^2.8.2"
chalk "^4.1.0"
debug "^4.3.4"
fs-extra "^9.0.1"

"@humanwhocodes/config-array@^0.5.0":
version "0.5.0"
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9"
Expand Down