Permalink
Browse files

. 显示包含空格的文件或目录时,仍然显示转义符'\'。(issues #134)

  • Loading branch information...
yaya
yaya committed Mar 30, 2017
1 parent f199cfb commit d75aa6ca70cbc675f290884f5b86b44de0326ab4
Showing with 24 additions and 0 deletions.
  1. +3 −0 ChangeLog_chenall.txt
  2. +6 −0 stage2/char_io.c
  3. +15 −0 stage2/disk_io.c
View
@@ -1,4 +1,7 @@
更新说明:
2017-03-30(yaya)
显示包含空格的文件或目录时,仍然显示转义符'\'。
2017-03-25(yaya)
增加 UUID 写功能。
例:uuid --write-uuid (hd0,3) 1234-5678
View
@@ -1161,6 +1161,12 @@ real_get_cmdline (void)
/* Find the position of the first character in this word. */
for (i = lpos; i > 0; i--)
{
if (buf[i - 1] == '"')
{
i--;
while (buf[i - 1] != '"')
i--;
}
if (buf[i - 1] == ' ' || buf[i - 1] == '=')
{
/* find backslashes immediately before the space */
View
@@ -1704,10 +1704,25 @@ dir (char *dirname)
void
print_a_completion (char *name, int case_insensitive)
{
char tem[256];
char *p = tem;
/* If NAME is "." or "..", do not count it. */
if (grub_strcmp (name, ".") == 0 || grub_strcmp (name, "..") == 0)
return;
while (*name)
{
if (*name == ' ')
{
*p++ = '\\';
*p++ = *name++;
}
else
*p++ = *name++;
}
*p = 0;
name = tem;
if (do_completion)
{
char *buf = unique_string;

0 comments on commit d75aa6c

Please sign in to comment.