quote path separator if ; in some cases; pointed out by komh

This commit is contained in:
tg 2015-08-13 22:06:23 +00:00
parent c674e71377
commit 1b8b792b7e
3 changed files with 9 additions and 7 deletions

View File

@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/check.t,v 1.704 2015/08/13 21:38:15 tg Exp $
# $MirOS: src/bin/mksh/check.t,v 1.705 2015/08/13 22:06:19 tg Exp $
# -*- mode: sh -*-
#-
# Copyright © 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
@ -7509,7 +7509,7 @@ expected-stdout:
nameref='\typeset -n'
nohup='nohup '
r='\builtin fc -e -'
source='PATH=$PATH;. \command .'
source='PATH=$PATH\;. \command .'
type='\builtin whence -v'
---
name: aliases-2b
@ -7621,7 +7621,7 @@ expected-stdout:
nameref='\typeset -n'
nohup='nohup '
r='\builtin fc -e -'
source='PATH=$PATH;. \command .'
source='PATH=$PATH\;. \command .'
type='\builtin whence -v'
---
name: aliases-3b-os2
@ -7643,7 +7643,7 @@ expected-stdout:
nameref='\typeset -n'
nohup='nohup '
r='\builtin fc -e -'
source='PATH=$PATH;. \command .'
source='PATH=$PATH\;. \command .'
type='\builtin whence -v'
---
name: aliases-cmdline

4
main.c
View File

@ -34,7 +34,7 @@
#include <locale.h>
#endif
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.300 2015/07/10 19:36:35 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.301 2015/08/13 22:06:22 tg Exp $");
extern char **environ;
@ -82,7 +82,7 @@ static const char *initcoms[] = {
"nameref=\\typeset -n",
"nohup=nohup ",
"r=\\builtin fc -e -",
"source=PATH=$PATH" MKSH_PATHSEPS ". \\command .",
"source=PATH=$PATH" MKSH_PATHSEPE ". \\command .",
"login=\\exec login",
NULL,
/* this is what AT&T ksh seems to track, with the addition of emacs */

4
sh.h
View File

@ -172,7 +172,7 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.740 2015/08/13 21:38:19 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.741 2015/08/13 22:06:23 tg Exp $");
#endif
#define MKSH_VERSION "R51 2015/08/13"
@ -387,10 +387,12 @@ struct rusage {
#endif
#ifdef __OS2__
#define MKSH_PATHSEPE "\\;"
#define MKSH_PATHSEPS ";"
#define MKSH_PATHSEPC ';'
#define MKSH_UNIXROOT "/@unixroot"
#else
#define MKSH_PATHSEPE ":"
#define MKSH_PATHSEPS ":"
#define MKSH_PATHSEPC ':'
#define MKSH_UNIXROOT ""