Skip to content

Latest commit

 

History

History
80 lines (62 loc) · 4.63 KB

README.md

File metadata and controls

80 lines (62 loc) · 4.63 KB

pinyin-completion

pre-commit.ci status github/workflow

github/downloads github/downloads/latest github/issues github/issues-closed github/issues-pr github/issues-pr-closed github/discussions github/milestones github/forks github/stars github/watchers github/contributors github/commit-activity github/last-commit github/release-date

github/license github/languages github/languages/top github/directory-file-count github/code-size github/repo-size github/v

Complete path by acronym of pinyin initials.

用拼音补全命令行中的中文名称和路径。

% ls
自然语言处理  '自然语言处理 课程结课作业.md'
% ls zr<TAB>
expansions
自然语言处理                   自然语言处理\ 课程结课作业.md
% cd zr<TAB>
% cd 自然语言处理/

Dependencies

Install

This plugin respects zsh plugin standard, so if you use any plugin manager and follow the instructions of your plugin manager, it can be installed correctly. Otherwise:

. /the/path/of/this/plugin/pinyin-completion.plugin.zsh

Configure

If you cannot distinguish n and l, try:

declare -A FUZZY=(
    [n]=l
)

Then always use l.

By default, this plugin will change Chinese punctuation to English punctuation. You can add more punctuation maps:

declare -A FUZZY=(
    […]=...
)

Then use ... to search the file whose name contains .