1
0
mirror of https://github.com/nvbn/thefuck.git synced 2024-10-06 02:41:10 +01:00
Commit Graph

7 Commits

Author SHA1 Message Date
Joseph Frazier
0c84eefa55 Don't suggest man 2/3 foo if no man pages exist
Suggest `foo --help` instead. However, if there are man pages, suggest
`foo --help` after `man 2/3 foo`

This addresses the comment in the previous commit message:

> However, in cases where multiple sections have man pages for `foo`,
> running `man foo` could bring up the "wrong" section of man pages.
> `man read` is an example of this, but that should probably be handled in
> a way that still suggests `foo --help` first when there are *no* man
> pages for `foo` in any section.
2016-10-03 14:10:42 -04:00
Joseph Frazier
8bd6c5da67 For man foo, try foo --help before man 3 foo
`man` without a section searches all sections, so having `foo --help`
suggested first makes more sense than adding a specific section. See
https://github.com/nvbn/thefuck/pull/562#issuecomment-251142710

However, in cases where multiple sections have man pages for `foo`,
running `man foo` could bring up the "wrong" section of man pages.
`man read` is an example of this, but that should probably be handled in
a way that still suggests `foo --help` first when there are *no* man
pages for `foo` in any section.

Closes https://github.com/nvbn/thefuck/issues/546
2016-10-03 12:03:57 -04:00
Joseph Frazier
5dbbb3b1ed Add ... --help to man suggestions
This is along the lines of what @waldyrious suggested in
https://github.com/nvbn/thefuck/issues/546, but it just adds a new
suggestion rather than replacing the other ones.
2016-10-03 03:57:53 -04:00
nvbn
df4d2cc88d ⚠️ Remove settings param from rules match, get_new_command and side_effect 2015-09-07 13:00:29 +03:00
mcarton
3ae01ac65d Adapt the man rule to #324 2015-07-31 21:41:07 +02:00
Pablo Santiago Blum de Aguiar
6cf430cc23 refact(man): do not match if there's no argument to man
If there's no argument to man, a call to thefuck should just give no
fuck.

Signed-off-by: Pablo Santiago Blum de Aguiar <scorphus@gmail.com>
2015-05-21 00:00:22 -03:00
mcarton
1f48d5e12a Add a rule to change man section 2015-05-20 18:08:15 +02:00