分页: 1 / 1

自己实现的bash拼音补齐功能

发表于 : 2010-11-09 10:07
emptyhua
2011 10.18更新
靠谱版本
http://bluehua.org/2011/09/28/1705.html

---------------------------------------------
参考这个:http://linuxtoy.org/archives/chsdir.html

不同:
1 . 转拼音的功能专门作成一个小软件 hz2py -h
2 . 没有直接覆盖bash-completion的内置函数,可以更好的兼容bash-completion

支持10.04和10.10从apt安装:

代码: 全选

sudo add-apt-repository ppa:emptyhua/toolbox
sudo apt-get update
sudo apt-get install chs-completion
安装后在新开的终端里才有效,使用:

代码: 全选

$cp [xr <tab>
补齐成
$cp ./\[夏日大作战\].Summer.Wars.2009.Blu-ray.720p.x264.DualAudio-MySiLU.
汉字转拼音程序可以单独使用

代码: 全选

echo 动感超人|hz2py

第一次写bash,也算用过了,呵呵~

Re: 自己实现的bash拼音补齐功能

发表于 : 2010-11-09 10:09
leeaman
哈,ee说的拼音补全啊,支持一个

Re: 自己实现的bash拼音补齐功能

发表于 : 2010-11-09 10:53
eexpress
额。bash作的?
不确定是我说的那个哦。

Re: 自己实现的bash拼音补齐功能

发表于 : 2010-11-10 17:48
tusooa
你。。。
2000多行c代码。。。
居然这样:

代码: 全选

tlcr: 0 庚寅年十月五日 17:43 ~dw/解压/hz2py/0.1-2 
● ./bin/hz2py       
哈哈
File encoding is not utf-8!
tlcr: 1 庚寅年十月五日 17:43 ~dw/解压/hz2py/0.1-2 
● ./bin/hz2py <<< '哈哈'
File encoding is not utf-8!
tlcr: 1 庚寅年十月五日 17:43 ~dw/解压/hz2py/0.1-2 
● ./bin/hz2py '哈哈'    
tlcr: 0 庚寅年十月五日 17:43 ~dw/解压/hz2py/0.1-2 
● echo 哈哈 | ./bin/hz2py 
File encoding is not utf-8!
tlcr: 1 庚寅年十月五日 17:43 ~dw/解压/hz2py/0.1-2 
● echo 哈哈 | ./bin/hz2py -f
File encoding is not utf-8!
tlcr: 1 庚寅年十月五日 17:44 ~dw/解压/hz2py/0.1-2 
● 

Re: 自己实现的bash拼音补齐功能

发表于 : 2010-11-10 18:10
photor
:em09

Re: 自己实现的bash拼音补齐功能

发表于 : 2010-11-10 18:39
emptyhua
:em20 我表示很有压力,您用的啥系统啊?
tusooa 写了:你。。。
2000多行c代码。。。
居然这样:

Re: 自己实现的bash拼音补齐功能

发表于 : 2010-12-10 10:21
20091157
很好用哈 谢谢咯