Code Monkey home page Code Monkey logo

system_config's Introduction

Introduction

根据个人工作中的需求对命令行的进行了一些扩展(包含添加新命令和改造已有命令),本项目基于ubuntu和ubuntu的衍生版本(暂不支持RedHat系列以及Mac OS),并且扩展只针对bash(暂不支持其他shell)

Install

  1. cd ~
  2. git clone https://github.com/PowerfulSpider/system_config.git
  3. cd system_config
  4. ./intall.sh
  5. source ~/.bashrc

注意:

  • 如果system_config中的部分命令与已有命令名称相同,可以在安装完后修改~/system_config/.bashrc中的冲突命令的名称,修改完之后,执行source ~/.bashrc

Features

扩展或新增的命令集合:cd、of、putclip、up、re、s

Documentation

  1. cd

cd命令会创建一个文件.dir_history,在你进入任何一个目录的时候,该目录的绝命路径将会被存储到.dir_history中,供下次执行cd命令时使用。

user@user-OptiPlex-3046:~
$ cd sys con
0) /home/user/system_config
1) /home/user/system_config/.cache
2) /home/user/system_config/test
=> est
0) /home/user/system_config/test
=> 0
user@user-OptiPlex-3046:~/system_config/test
$ 

支持多个词语过滤.dir_history中的历史路径,.dir_history中的路径只有完全包含这些过滤词时才会被打印,在打印完之后,可以继续输入词语过滤或者直接输入序号进入序号对应的路径。

注意:

  • 如果序号为0的路径就是你想进入的路径,直接Enter就可以,不需要输入0
  • 路径会根据使用记录自动排序,越近访问的越靠前

  1. re

re是查找历史命名记录的命令,其使用方法和cd命令基本相同。

user@user-OptiPlex-3046:~/system_config
$ re git clone
0) git clone [email protected]:data-integration/com.kgtdata.qa.joyoung.git
1) git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
2) git clone https://github.com/pein0119/emacs.d.git
3) git clone [email protected]:PowerfulSpider/system_config.git
=> emacs
0) git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
1) git clone https://github.com/pein0119/emacs.d.git
=> 1

re命令同样支持多个词语过滤.bash_history的历史命令,.bash_history中的历史命令只有完全包含这些过滤词时才会被打印,在打印完之后,可以继续输入词语过滤或者直接输入序号(序号对应的历史命令将会被保存到系统剪贴板中)。

注意:

  • 如果序号为0的历史命令就是你需要的历史命令,直接Enter就可以,不需要输入0
  • 历史命令会根据使用记录自动排序,越近访问的越靠前
  • 历史命令中相同的命令不会重复打印

  1. of

of命令是在命令行中打开文件管理器的命令,其使用方法和cd命令基本相同。

user@user-OptiPlex-3046:~$ of sys
0) /home/user/system_config
1) /home/user/system_config/test
2) /home/user/system_config/.cache
3) /sys
=> est
0) /home/user/system_config/test
=> 0

of命令同样支持支持多个词语过滤.dir_history中的历史路径,.dir_history中的路径只有完全包含这些过滤词时才会被打印,在打印完之后,可以继续输入词语过滤或者直接输入序号打开序号对应路径的文件夹。

注意:

  • 如果序号为0的路径就是你想打开的,直接Enter就可以,不需要输入0
  • 路径会根据使用记录自动排序,越近访问的越靠前

  1. s

s命令是在终端中用firefox搜索的命令

user@user-OptiPlex-3046:~
$ s kw1 kw2 ... kwn
0) https://www.bing.com/search?q=keyword
1) https://www.baidu.com/s?wd=keyword
=> 1

可以自定义搜索引擎,上面显示了两个搜索引擎(百度和bing)

s命令在打印完候选项之后,同样可以输入词语继续过滤或者输入序号(firefox会自动打开并搜索)

注意:

  • 如果序号为0的候选项就是你想要使用的搜索引擎,直接Enter就可以,不需要输入0

  1. putclip

putclip命令是在终端中通过管道复制文本到系统剪贴板的命令

user@user-OptiPlex-3046:~/xul/java_workspace
$ pwd|putclip
user@user-OptiPlex-3046:~/xul/java_workspace
$ cat text.txt|putclip

使用putclip命令之后,再粘贴,便可将先前放到系统剪贴板中的文本粘贴出来

Disclaimer

参考了大师的作品:https://github.com/baohaojun/system-config

License

GPLv3

system_config's People

Contributors

xuliang09 avatar

Stargazers

 avatar  avatar  avatar

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.