|
|
发表于 2022-9-21 20:43:27
|
显示全部楼层
人毛子有个项目叫thefuck我已经用的欲罢不能了。
nvbn/thefuck · GitHub就是在terminal里边打错一个命令,然后不用修改后重新打一遍,直接打fuck,这个项目就会自动帮你修证然后执行。
比如你打apt-get install XXX
然后提示permission denied
这时候执行fuck
就会自动帮你执行 sudo apt-get install XXX
知乎播不了gif,项目说明里边有个很清晰的gif介绍,只能自己点链接进去看了。
下面有几个作者给出的例子。
➜ git pushfatal: The current branch master has no upstream branch.To push the current branch and set the remote as upstream, use git push --set-upstream origin master➜ fuckgit push --set-upstream origin master [enter/↑/↓/ctrl+c]Counting objects: 9, done....
➜ puthonNo command 'puthon' found, did you mean: Command 'python' from package 'python-minimal' (main) Command 'python' from package 'python3' (main)zsh: command not found: puthon➜ fuckpython [enter/↑/↓/ctrl+c]Python 3.4.2 (default, Oct 8 2014, 13:08:17)...
➜ git brnchgit: 'brnch' is not a git command. See 'git --help'.Did you mean this? branch➜ fuckgit branch [enter/↑/↓/ctrl+c]* master
➜ lein rpl'rpl' is not a task. See 'lein help'.Did you mean this? repl➜ fucklein repl [enter/↑/↓/ctrl+c]nREPL server started on port 54848 on host 127.0.0.1 - nrepl://127.0.0.1:54848REPL-y 0.3.1...
为毛突然多了100个赞。。 |
|