mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 19:03:38 +08:00
Minor fix to code for detecting help switches to builtins
darcs-hash:20060724124845-ac50b-546662123d4d30c314acb1fb74d3c9503332172b.gz
This commit is contained in:
parent
787e99d901
commit
9bbe19bfb8
4
parser.c
4
parser.c
|
@ -1468,8 +1468,10 @@ int parser_is_help( wchar_t *s, int min_match )
|
|||
{
|
||||
int len = wcslen(s);
|
||||
|
||||
min_match = maxi( min_match, 3 );
|
||||
|
||||
return ( wcscmp( L"-h", s ) == 0 ) ||
|
||||
( len >= 3 && (wcsncmp( L"--help", s, len ) == 0) );
|
||||
( len >= min_match && (wcsncmp( L"--help", s, len ) == 0) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user