Skip to content

Commit

Permalink
Merge pull request #7 from fordhurley/print-command
Browse files Browse the repository at this point in the history
Print out the fucking command before running it
  • Loading branch information
nvbn committed Apr 17, 2015
2 parents 48831fa + 11cbb9e commit 2f28681
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Expand Up @@ -12,7 +12,8 @@ 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?

➜ fuck
[sudo] password for nvbn:
sudo apt-get install vim
[sudo] password for nvbn:
Reading package lists... Done
...

Expand All @@ -24,6 +25,7 @@ To push the current branch and set the remote as upstream, use


➜ fuck
git push --set-upstream origin master
Counting objects: 9, done.
...

Expand All @@ -34,6 +36,7 @@ No command 'puthon' found, did you mean:
zsh: command not found: puthon

➜ fuck
python
Python 3.4.2 (default, Oct 8 2014, 13:08:17)
...

Expand All @@ -44,6 +47,7 @@ Did you mean this?
branch

➜ fuck
git branch
* master
```

Expand Down
1 change: 1 addition & 0 deletions thefuck/main.py
Expand Up @@ -71,6 +71,7 @@ def get_matched_rule(command, rules, settings):
def run_rule(rule, command, settings):
"""Runs command from rule for passed command."""
new_command = rule.get_new_command(command, settings)
sys.stderr.write(new_command + '\n')
print(new_command)


Expand Down

0 comments on commit 2f28681

Please sign in to comment.