mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-02 01:40:49 +02:00
commit bash-20130809 snapshot
This commit is contained in:
+16
-3
@@ -626,19 +626,32 @@ STRCOMPARE (p, pe, s, se)
|
||||
{
|
||||
int ret;
|
||||
CHAR c1, c2;
|
||||
int l1, l2;
|
||||
|
||||
l1 = pe - p;
|
||||
l2 = se - s;
|
||||
|
||||
if (l1 != l2)
|
||||
return (FNM_NOMATCH); /* unequal lengths, can't be identical */
|
||||
|
||||
c1 = *pe;
|
||||
c2 = *se;
|
||||
|
||||
*pe = *se = '\0';
|
||||
if (c1 != 0)
|
||||
*pe = '\0';
|
||||
if (c2 != 0)
|
||||
*se = '\0';
|
||||
|
||||
#if HAVE_MULTIBYTE || defined (HAVE_STRCOLL)
|
||||
ret = STRCOLL ((XCHAR *)p, (XCHAR *)s);
|
||||
#else
|
||||
ret = STRCMP ((XCHAR *)p, (XCHAR *)s);
|
||||
#endif
|
||||
|
||||
*pe = c1;
|
||||
*se = c2;
|
||||
if (c1 != 0)
|
||||
*pe = c1;
|
||||
if (c2 != 0)
|
||||
*se = c2;
|
||||
|
||||
return (ret == 0 ? ret : FNM_NOMATCH);
|
||||
}
|
||||
|
||||
@@ -1833,7 +1833,7 @@ _completion_loader()
|
||||
@{
|
||||
. "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124
|
||||
@}
|
||||
complete -D -F _completion_loader
|
||||
complete -D -F _completion_loader -o bashdefault -o default
|
||||
@end example
|
||||
|
||||
@node Programmable Completion Builtins
|
||||
|
||||
+1
-1
@@ -393,7 +393,7 @@ _rl_strnicmp (string1, string2, count)
|
||||
break;
|
||||
s2++;
|
||||
}
|
||||
while (--count != 0)
|
||||
while (--count != 0);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user