Cleanup from Gennady Feldman <gfeldman@mail.com>
This commit is contained in:
parent
a9819b2908
commit
2d5b64273f
10
lash.c
10
lash.c
@ -807,14 +807,8 @@ static int get_command(FILE * source, char *command)
|
|||||||
signal(SIGWINCH, SIG_DFL);
|
signal(SIGWINCH, SIG_DFL);
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
i=strlen(cwd);
|
fprintf(stdout, "[%s@%s %s]%s",user, buf,
|
||||||
i--;
|
get_last_path_component(cwd), prompt);
|
||||||
if (i>1){
|
|
||||||
while ((i>0) && (*(cwd+i)!='/') ) i--;
|
|
||||||
if (*(cwd+i)=='/') i++;
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(stdout, "[%s@%s %s]%s",user, buf, (cwd+i), prompt);
|
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
10
sh.c
10
sh.c
@ -807,14 +807,8 @@ static int get_command(FILE * source, char *command)
|
|||||||
signal(SIGWINCH, SIG_DFL);
|
signal(SIGWINCH, SIG_DFL);
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
i=strlen(cwd);
|
fprintf(stdout, "[%s@%s %s]%s",user, buf,
|
||||||
i--;
|
get_last_path_component(cwd), prompt);
|
||||||
if (i>1){
|
|
||||||
while ((i>0) && (*(cwd+i)!='/') ) i--;
|
|
||||||
if (*(cwd+i)=='/') i++;
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(stdout, "[%s@%s %s]%s",user, buf, (cwd+i), prompt);
|
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
10
shell/lash.c
10
shell/lash.c
@ -807,14 +807,8 @@ static int get_command(FILE * source, char *command)
|
|||||||
signal(SIGWINCH, SIG_DFL);
|
signal(SIGWINCH, SIG_DFL);
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
i=strlen(cwd);
|
fprintf(stdout, "[%s@%s %s]%s",user, buf,
|
||||||
i--;
|
get_last_path_component(cwd), prompt);
|
||||||
if (i>1){
|
|
||||||
while ((i>0) && (*(cwd+i)!='/') ) i--;
|
|
||||||
if (*(cwd+i)=='/') i++;
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(stdout, "[%s@%s %s]%s",user, buf, (cwd+i), prompt);
|
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user