1.简介

遇到不认识的单词或需要翻译的中文还得打开浏览器百度翻译等进行翻译,今天来介绍自想的命令行翻译法。借用了github开源代码,自己改动了一下

2. 效果

MAC Iterm 支持命令行翻译中英文
image.png

3.实现步骤

clone 代码到/Users/tuzisir/language/php/tool 我自己的目录

git clone [email protected]:tuzisir-php/dic-in-php.git

自定义系统命令

sudo vi ~/.bash_profile

顶部加入 alias fy="php /Users/tuzisir/language/php/tool/dic-in-php/dic.php"

sudo vi ~/.zshrc

最底部加入 source ~/.bash_profile

执行 source ~/.zshrc

这样就可以随时随地 fy XXX 了

相关文章:

  • 2021-06-07
  • 2021-05-15
  • 2022-12-23
  • 2021-09-07
  • 2022-12-23
  • 2022-01-19
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-13
  • 2021-10-02
  • 2021-07-11
  • 2021-05-27
  • 2022-12-23
  • 2021-07-08
  • 2021-11-29
相关资源
相似解决方案