sshd server puts remote user@target in the console prompt
Usability improvement fix ( issue #6 ). sshd.exe puts remote user and host info on the console prompt. user@target $P$G is set as cmd.exe PROMPT via environment variable.
This commit is contained in:
parent
9fa909e3df
commit
ded4138b58
|
@ -762,6 +762,12 @@ do_exec_no_pty(Session *s, const char *command)
|
|||
|
||||
SetEnvironmentVariable("SSH_CONNECTION", buf);
|
||||
|
||||
// set better prompt for Windows cmd shell
|
||||
if (!s -> is_subsystem) {
|
||||
snprintf(buf,sizeof buf, "%s@%s $P$G", s->pw->pw_name, getenv("COMPUTERNAME"));
|
||||
SetEnvironmentVariable("PROMPT", buf);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the current user's name (associated with sshd thread).
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue