mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-07 13:41:21 +00:00
Merge pull request #7 from fordhurley/print-command
Print out the fucking command before running it
This commit is contained in:
commit
2f28681b62
@ -12,6 +12,7 @@ E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
|
|||||||
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
|
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
|
||||||
|
|
||||||
➜ fuck
|
➜ fuck
|
||||||
|
sudo apt-get install vim
|
||||||
[sudo] password for nvbn:
|
[sudo] password for nvbn:
|
||||||
Reading package lists... Done
|
Reading package lists... Done
|
||||||
...
|
...
|
||||||
@ -24,6 +25,7 @@ To push the current branch and set the remote as upstream, use
|
|||||||
|
|
||||||
|
|
||||||
➜ fuck
|
➜ fuck
|
||||||
|
git push --set-upstream origin master
|
||||||
Counting objects: 9, done.
|
Counting objects: 9, done.
|
||||||
...
|
...
|
||||||
|
|
||||||
@ -34,6 +36,7 @@ No command 'puthon' found, did you mean:
|
|||||||
zsh: command not found: puthon
|
zsh: command not found: puthon
|
||||||
|
|
||||||
➜ fuck
|
➜ fuck
|
||||||
|
python
|
||||||
Python 3.4.2 (default, Oct 8 2014, 13:08:17)
|
Python 3.4.2 (default, Oct 8 2014, 13:08:17)
|
||||||
...
|
...
|
||||||
|
|
||||||
@ -44,6 +47,7 @@ Did you mean this?
|
|||||||
branch
|
branch
|
||||||
|
|
||||||
➜ fuck
|
➜ fuck
|
||||||
|
git branch
|
||||||
* master
|
* master
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -71,6 +71,7 @@ def get_matched_rule(command, rules, settings):
|
|||||||
def run_rule(rule, command, settings):
|
def run_rule(rule, command, settings):
|
||||||
"""Runs command from rule for passed command."""
|
"""Runs command from rule for passed command."""
|
||||||
new_command = rule.get_new_command(command, settings)
|
new_command = rule.get_new_command(command, settings)
|
||||||
|
sys.stderr.write(new_command + '\n')
|
||||||
print(new_command)
|
print(new_command)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user