diff --git a/IPCIF/src/fs_sh/fs_sh/sh_cmd_linux.cpp b/IPCIF/src/fs_sh/fs_sh/sh_cmd_linux.cpp index 33aeea8..9134201 100755 --- a/IPCIF/src/fs_sh/fs_sh/sh_cmd_linux.cpp +++ b/IPCIF/src/fs_sh/fs_sh/sh_cmd_linux.cpp @@ -77,19 +77,18 @@ static int check_args(vector>& args,bool mute=false) } else { + int ret=0; for(int i=0;i(*p,"")); - break; - } + if(cmd_head!=s_alias[i].alias) + continue; + if(0!=(ret=check_args(args))) + return ret; + args.erase(args.begin()); + int j; + const char** p; + for(j=0,p=s_alias[i].full;*p!=NULL;j++,p++) + args.insert(args.begin()+j,pair(*p,"")); + break; } generate_cmd(args,cmd); if(0!=(ret=system(cmd.c_str()))) diff --git a/misc/unittest/unittest/fs_sh/sh_cmd_linux.cpp b/misc/unittest/unittest/fs_sh/sh_cmd_linux.cpp index 33aeea8..9134201 100755 --- a/misc/unittest/unittest/fs_sh/sh_cmd_linux.cpp +++ b/misc/unittest/unittest/fs_sh/sh_cmd_linux.cpp @@ -77,19 +77,18 @@ static int check_args(vector>& args,bool mute=false) } else { + int ret=0; for(int i=0;i(*p,"")); - break; - } + if(cmd_head!=s_alias[i].alias) + continue; + if(0!=(ret=check_args(args))) + return ret; + args.erase(args.begin()); + int j; + const char** p; + for(j=0,p=s_alias[i].full;*p!=NULL;j++,p++) + args.insert(args.begin()+j,pair(*p,"")); + break; } generate_cmd(args,cmd); if(0!=(ret=system(cmd.c_str())))