https://github.com/utilyre/dictate
CLI utility for looking up words in online dictionary
https://github.com/utilyre/dictate
api cli command-line-tool dictionary dictionary-api rust utility
Last synced: 12 months ago
JSON representation
CLI utility for looking up words in online dictionary
- Host: GitHub
- URL: https://github.com/utilyre/dictate
- Owner: utilyre
- License: mit
- Created: 2023-02-10T10:43:37.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-26T10:42:04.000Z (over 2 years ago)
- Last Synced: 2024-04-29T20:21:24.392Z (almost 2 years ago)
- Topics: api, cli, command-line-tool, dictionary, dictionary-api, rust, utility
- Language: Rust
- Homepage: https://crates.io/crates/dictate
- Size: 121 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dictate
Lookup words in [dictionaryapi.dev][dictionaryapi] right from the terminal
without interrupting your workflow.
[dictionaryapi]: https://dictionaryapi.dev/
## 📦 Installation
- [crates.io][dictate]
```bash
cargo install dictate
```
[dictate]: https://crates.io/crates/dictate
## 🚀 Usage
- Lookup "hello" in the dictionary
```bash
dictate lookup hello
```
**NOTE**: This also caches the output for later `lookup`s.
- Clean up the cached entries
```bash
dictate clean -c
```
## 💻 Shell Completion
- Bash
1. Run the following
```bash
mkdir -p ~/.local/share/bash-completion/completions
dictate complete bash > ~/.local/share/bash-completion/completions/rustup
```
2. Restart bash and you should have tab-completion now.
- Zsh
1. Append `~/.zfunc` to `fpath` in your zsh config
**NOTICE**: Make sure to insert the following line before initializing
`compinit`.
```bash
fpath+=("$HOME/.zfunc")
```
2. Create the appended directory and dump completion definition to
`~/.zfunc/_dictate`
```bash
mkdir -p ~/.zfunc
dictate complete zsh > ~/.zfunc/_dictate
```
3. Restart zsh and you should have tab-completion now.
**NOTE**: In case it's not working yet, delete `~/.zcompdump` and restart
your shell again.
- Fish
1. Run the following
```fish
mkdir -p ~/.config/fish/completions
dictate complete fish > ~/.config/fish/completions/rustup.fish
```
2. Restart fish and you should have tab-completion now.