GithubHelp home page GithubHelp logo

hchyang / pinyin-completion Goto Github PK

View Code? Open in Web Editor NEW

This project forked from petronny/pinyin-completion

0.0 0.0 0.0 597 KB

complete path name based upon the pinyin acronym of Chinese characters

Shell 0.50% Python 99.50%

pinyin-completion's Introduction

pinyin-completion

Complete path by acronym of pinyin initials.

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

This is a fork for enhancement and bugs fixing.

Enhancement

  • Auto escaping for special characters.
  • Fixed missing _force_rehash() error.
  • Removed a unnecessary completion in zsh.

Sample

$ ls .
SVN培训  全球眼  浙江建行  浙江农信
$ cd S     <tab>             进入[SVN培训]
$ cd q     <tab>             进入[全球眼]
$ cd z     <tab>             自动补全[浙江]
$ cd zj    <tab><tab>        提示[浙江建行 浙江农信]备选
$ cd zj1   <tab>             进入[浙江建行]
$ cd zj2   <tab>             进入[浙江农信]
$ cd 浙江j <tab>             进入[浙江建行]
$ cd zjj   <tab>             进入[浙江建行]

Install

git clone [email protected]:petronny/pinyin-completion.git
cd pinyin-completion
sudo ./setup.py install

Usage

For Bash users, source shell/pinyin-comp.bash in your ~/.bashrc

For Zsh users, source shell/pinyin-comp.zsh in your ~/.zshrc

Others

tools/table-generator.py is used to generate pinyin_initial.py, based upon the contents of tools/unicode-han-pinyin.txt.

If you feel the default pinyin_initial.py is too big, which cause sensible delay and un-wanted ambigurous, just use you favourite editor to modify tools/unicode-han-pinyin.txt, then regenerate pinyin_initial.py by running:

$ ./table-generate.py > pinyin_initial.py

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.