petronny / pinyin-completion Goto Github PK
View Code? Open in Web Editor NEWThis project forked from adaptee/pinyin-completion
complete path name based upon the pinyin acronym of Chinese characters
License: GNU General Public License v3.0
This project forked from adaptee/pinyin-completion
complete path name based upon the pinyin acronym of Chinese characters
License: GNU General Public License v3.0
@petronny ,您好!
首先感谢您接手此项目并将此软件带到 [archlinuxcn] 仓库。 🌹
在此我冒昧报告一个问题:
使用 Zsh
配合此软件进行拼音补全时,当出现多于一个匹配的中文目录补全时,按 Tab
键不知为何会增加一个候选项,内容为所有匹配中文目录连接在一起的字符串(并不存在名字为此字符串的目录),见图:
如何去掉这一个多余且不存在的候选项?
在此祝您新年愉快! 🎁
此致! 🙇
Miss a LICENSE will affect packaging NixOS/nixpkgs#262218.
当前环境:archlinux,zsh
当前目录test文件夹下有一个‘测试.txt'文件,输入命令 cd test/ ,然后按tab补全,会将测试.txt和test/作为候选项,测试.txt作为文件不应被列到cd补全列表里,test/作为上级目录也不应列到补全候选里。
如果不是中文文件名就没这个bug,比如当前目录test文件夹下有一个test.txt文件,输入 cd test/ ,按tab补全,zsh就会提示‘-- No Matches Found --’,不会将test.txt作为补全候选,也不会列出test/。
不知道描述清楚没,有需要另外信息请指教。
另外感谢petronny,简直是中文用户的神器。我这里也没有性能问题,感觉和没启用之前一样快。
should replace
reply=(${(q)$(pinyin-comp x-d $*)} $*)
with
reply=(${$(pinyin-comp x-d $*)} $*)
to avoid outputs being escaped twice:
(base) (win/x64) ➜ ~/winhome/Downloads ls zr<TAB>
\'自然语言处理结课报告封面.docx\' \'自然语言处理课程结课作业.docx\' zr
(base) (win/x64) ➜ ~/winhome/Downloads ls \'自然语言处理结课报告封面.docx\' # should be '自然语言处理结课报告封面.docx'
this project has become the only one program which depend on python2.
why not migrate it to python3?
thanks!
In ubuntu-20.04 LTS:
❯ pinyin-comp -d a
Traceback (most recent call last):
File "/home/wzy/.local/share/zinit/plugins/pinyin-completion/pinyin-comp", line 233, in <module>
locale.setlocale(locale.LC_ALL, "")
File "/usr/lib/python3.10/locale.py", line 620, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting
I find comment locale.setlocale(locale.LC_ALL, "")
can make this plugin work. What is the function of this line? Can we remove it or change it to:
from contextlib import suppress
import locale
with suppress(locale.Error):
locale.setlocale(locale.LC_ALL, "")
@petronny ,您好!
首先感谢您接手此项目并将此软件带到 [archlinuxcn] 仓库。 🌹
在此我冒昧报告一个问题:
普通的 Zsh
补全有着色,而中文补全无着色,应该怎样使中文补全有着色?见图:
在此祝您新年愉快! 🎁
此致! 🙇
by testing i found it looks like this plugin depends on oh-my-zsh. is it true? or i made some mistakes?
又打扰了,刚才又发现一个alias的命令的问题。
我zshrc里有一些alias的命令,其中一个是mplayer的:alias mplayertext='mplayer -vo aa' 。
当我输入mplayertext后按tab正常的应该是显示当前目录的文件和子目录,但是却补全了当前的alias命令mplayertest。如下图:
还有另一种情况,在zshrc里alias一个比mplayertext更长的命令,比如:alias mplayertexttext='mplayer -vo aa' 。
这时再输入mplayertext按tab就正常显示目录和文件。如下图:
alias的命令补全时只有一个候选就会出现问题。
有方法从自己已有的所有文件里, 扒出所有中文, 自己建一个pinyin_initial.py吗?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.