mirror of
https://github.com/nvbn/thefuck.git
synced 2025-08-03 20:59:48 +01:00
tests
thefuck
rules
__init__.py
apt_get.py
brew_install.py
brew_unknown_command.py
cd_correction.py
cd_mkdir.py
cd_parent.py
composer_not_command.py
cp_omitting_directory.py
cpp11.py
django_south_ghost.py
django_south_merge.py
dry.py
fix_alt_space.py
git_add.py
git_checkout.py
git_not_command.py
git_pull.py
git_push.py
git_stash.py
grep_recursive.py
has_exists_script.py
java.py
javac.py
lein_not_task.py
ls_lah.py
man.py
man_no_space.py
mkdir_p.py
no_command.py
no_such_file.py
open.py
pacman.py
pip_unknown_command.py
python_command.py
rm_dir.py
rm_root.py
sl_ls.py
ssh_known_hosts.py
sudo.py
switch_lang.py
whois.py
__init__.py
conf.py
logs.py
main.py
shells.py
types.py
utils.py
.gitignore
.travis.yml
LICENSE.md
MANIFEST.in
README.md
release.py
requirements.txt
setup.cfg
setup.py
tox.ini
14 lines
309 B
Python
14 lines
309 B
Python
# Fixes common java command mistake
|
|
#
|
|
# Example:
|
|
# > java foo.java
|
|
# Error: Could not find or load main class foo.java
|
|
#
|
|
|
|
def match(command, settings):
|
|
return (command.script.startswith ('java ')
|
|
and command.script.endswith ('.java'))
|
|
|
|
def get_new_command(command, settings):
|
|
return command.script[:-5]
|