Linux command
sdcv 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Look up word
sdcv [word]
Look up with specific dictionary
sdcv -u "[dictionary_name]" [word]
List available dictionaries
sdcv -l
Non-interactive mode
sdcv -n [word]
Show exact matches only
sdcv -e [word]
Use data directory
sdcv --data-dir [/path/to/dicts] [word]
JSON output
sdcv --json [word]
说明
sdcv (StarDict console version) provides command-line dictionary lookup. It uses StarDict format dictionaries, which are widely available. Dictionaries are stored in ~/.stardict/dic or system directories. Many languages and specialized dictionaries are available for download. Interactive mode provides a prompt for multiple lookups. Non-interactive mode suits scripting and integration. Fuzzy search finds similar words when exact matches fail. This helps with spelling variations or typos. Multiple dictionaries can be searched simultaneously. Results from all are shown unless a specific dictionary is selected. Output formatting supports terminal display and programmatic processing. JSON output enables integration with other tools.
参数
- -l, --list-dicts
- List available dictionaries.
- -u _DICT_
- Use specific dictionary.
- -n, --non-interactive
- Non-interactive mode.
- -e, --exact-search
- Exact matches only.
- -x, --only-data-dir
- Only use dictionaries in data-dir, do not search in user and system directories.
- --data-dir _DIR_
- Dictionary data directory.
- -j, --json
- JSON output.
- --color
- Colored output.
- --utf8-input
- UTF-8 input.
- --utf8-output
- UTF-8 output.
- -v, --version
- Display version and exit.
- -h, --help
- Show help.
FAQ
What is the sdcv command used for?
sdcv (StarDict console version) provides command-line dictionary lookup. It uses StarDict format dictionaries, which are widely available. Dictionaries are stored in ~/.stardict/dic or system directories. Many languages and specialized dictionaries are available for download. Interactive mode provides a prompt for multiple lookups. Non-interactive mode suits scripting and integration. Fuzzy search finds similar words when exact matches fail. This helps with spelling variations or typos. Multiple dictionaries can be searched simultaneously. Results from all are shown unless a specific dictionary is selected. Output formatting supports terminal display and programmatic processing. JSON output enables integration with other tools.
How do I run a basic sdcv example?
Run `sdcv [word]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -l, --list-dicts do in sdcv?
List available dictionaries.