Look up and memorize all words in terminal offline / online!
- sqlite3
- openssl
It is recommended to download the prebuilt binary file for your platform from the Github Release on the right side.
Alternatively, you can also download the latest build binaries, including Linux and Windows versions, from the GitHub Actions.
cargo install dioxionary
$ eval "$(dioxionary -c bash)" # for bash
$ eval "$(dioxionary -c zsh)" # for zsh
$ eval "$(dioxionary -c fish)" # for fish
You can write the above commands directly into the configuration file of your shell.
$ dioxionary lookup [OPTIONS] [WORD]
The subcommand lookup
can be omitted:
$ dioxionary [OPTIONS] [WORD]
When there is no word to be searched in the parameter, it will enter the interactive mode, and can search infinitely until Ctrl+D
is pressed.
Supports and uses fuzzy search by default. When no word is found in the dictionary, it will output the most similar definition of one or more words.
Use -e
or --exact-search
to turn off fuzzy search. You can also turn fuzzy search on or off by prefixing a word with /
or |
, and use web dictionaries with @
before a word.
$ dioxionary /terraria # Fuzzy search
$ dioxionary '|terraria' # Non-fuzzy search, pay attention to use quotation marks
$ dioxionary @terraria # Online search
The local dictionary is used by default, and the local dictionary directory should be stored in:
Platform | Value | Example |
---|---|---|
Linux | $XDG_CONFIG_HOME/dioxionary or $HOME /.config/dioxionary |
/home/alice/.config/dioxionary |
macOS | $HOME /Library/Application Support/dioxionary |
/Users/Alice/Library/Application Support/dioxionary |
Windows | {FOLDERID_RoamingAppData} /dioxionary |
C:\Users\Alice\AppData\Roaming/dioxionary |
Only stardict dictionary format is supported
You can download dictionaries in stardict format at http://download.huzheng.org/
~/.config/dioxionary
├── 00-cdict-gb
├── 01-kdic-computer-gb
├── 02-langdao-ec-gb
├── 03-oxford-gb
└── 04-powerword2011_1_900
00-cdict-gb
├── cdict-gb.dict
├── cdict-gb.dict.dz
├── cdict-gb.idx
└── cdict-gb.ifo
Using the -x
option will use an online dictionary lookup:
$ dioxionary -x <DICTDIR> <WORD>
The dictionary file path can be specified with the -l
or --local
option.
Use the -L
or --local-first
option to use the network dictionary after a local lookup fails. It is recommended to add alias rl='dioxionary -l'
in the shell configuration file.
As in the above example, the dictionary directories can be named in the format of 00-XXX
, 01-YYY
, ..., 99-ZZZ
to achieve priority.
Note: Only the word type will be searched and recorded when searching online
$ dioxionary list [OPTIONS] [TYPE]
The following word types are supported:
CET4 | CET6 | TOEFL | IELTS | GMAT | GRE | SAT |
---|
List all records when type is missing.
Count the number of various words that have been queried:
$ dioxionary count