mirror of
				https://github.com/nvbn/thefuck.git
				synced 2025-10-30 06:34:09 +00:00 
			
		
		
		
	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
This commit is contained in:
		| @@ -23,7 +23,7 @@ def test_not_match(command): | ||||
|  | ||||
|  | ||||
| @pytest.mark.parametrize('command, new_command', [ | ||||
|     (Command('man read'), ['man 3 read', 'man 2 read', 'read --help']), | ||||
|     (Command('man read'), ['read --help', 'man 3 read', 'man 2 read']), | ||||
|     (Command('man 2 read'), 'man 3 read'), | ||||
|     (Command('man 3 read'), 'man 2 read'), | ||||
|     (Command('man -s2 read'), 'man -s3 read'), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user