MacOS系統使用系列-2.Mac命令行提升效率工具thefuck

在mac的命令行操作時,是不是經常忘記一些命令,或者記錯了命令,這個時候是不是想說一句fuck,好的,現在就介紹這款能讓你爽翻天,還能提高效率的工具。首先感謝 @liamosaur tweet 大神開發了該工具 ,也要感謝我的同事介紹給我這款工具,我也是今天朋友介紹給我的,爽翻天,so,我不能自己一個人爽,要爽大家一起爽

1.thefuck工具簡介

thefuck是github上一款針對linux和Mac os系統的開源的工具軟件,當你在命令行裏敲錯了命令報錯時,只需要輸入fuck,thefuck工具便會智能提供相對應的正確命令候選項,你可enter直接執行或者Ctrl+C退出。
是不是很爽。下面是傳送門:GitHub地址 https://github.com/nvbn/thefuck

2.工具安裝

max os中安裝了brew命令,直接執行:brew install the fuck
示例:
$ brew install thefuck
Updating Homebrew...

curl: (35) Server aborted the SSL handshake
Error:Failed to download resource "thefuck"
Warning:Bottle installation failed: building from source.

curl: (35) Server aborted the SSL handshake
Error:Failed to download resource "thefuck"
chenwenxindeMacBook-Pro:MLP chenwenxin$ brew install thefuck
######################################################################## 100.0%
==>Pouring thefuck-3.24.sierra.bottle.tar.gz
==>Caveats
Add the following to your .bash_profile, .bashrc or .zshrc:

  eval "$(thefuck --alias)"

==>Summary
��  /usr/local/Cellar/thefuck/3.24: 708 files, 6.3MB

另外:
如果沒有homebrew工具,命令行執行該命令進行安裝:

3.工具示例


示例1:進入python命令行

chenwenxindeMacBook-Pro:MLP chenwenxin$ pytno
-bash: pytno: command not found
chenwenxindeMacBook-Pro:MLP chenwenxin$ fuck
python[enter///ctrl+c]
Python 2.7.10 (default, Feb  7 2017, 00:08:15)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

示例2:啓動mysql服務

chenwenxindeMacBook-Pro:MLP chenwenxin$ myslq.server start
-bash: myslq.server: command not found
chenwenxindeMacBook-Pro:MLP chenwenxin$ fuck
mysql.server start[enter///ctrl+c]
Starting MySQL
 SUCCESS!
chenwenxindeMacBook-Pro:MLP chenwenxin$ mysql.server stop
Shutting down MySQL
. SUCCESS! 

是不是爽翻天!
是不是爽翻天!
是不是爽翻天!
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章