mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-18 17:29:28 +03:00
Add comments explaining pdksh and mksh features
This commit is contained in:
parent
a9107dbad1
commit
014cb2099f
@ -389,7 +389,7 @@ init_subshell_child (const char *pty_name)
|
|||||||
/* Do we have a custom init file ~/.local/share/mc/mkshrc? */
|
/* Do we have a custom init file ~/.local/share/mc/mkshrc? */
|
||||||
init_file = mc_config_get_full_path (MC_MKSHRC_FILE);
|
init_file = mc_config_get_full_path (MC_MKSHRC_FILE);
|
||||||
|
|
||||||
/* Otherwise use ~/.mkshrc */
|
/* Otherwise use ~/.mkshrc (default behavior of mksh) */
|
||||||
if (!exist_file (init_file))
|
if (!exist_file (init_file))
|
||||||
{
|
{
|
||||||
g_free (init_file);
|
g_free (init_file);
|
||||||
@ -400,6 +400,8 @@ init_subshell_child (const char *pty_name)
|
|||||||
* is not already set. */
|
* is not already set. */
|
||||||
g_setenv ("ENV", init_file, FALSE);
|
g_setenv ("ENV", init_file, FALSE);
|
||||||
|
|
||||||
|
/* Note mksh doesn't support HISTCONTROL. */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SHELL_ZSH:
|
case SHELL_ZSH:
|
||||||
@ -1203,12 +1205,14 @@ init_subshell_precmd (char *precmd, size_t buff_size)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SHELL_KSH:
|
case SHELL_KSH:
|
||||||
|
/* pdksh based variants support \x placeholders but not any "precmd" functionality. */
|
||||||
g_snprintf (precmd, buff_size,
|
g_snprintf (precmd, buff_size,
|
||||||
" PS1='$(pwd>&%d; kill -STOP $$)\\u@\\h:\\w\\$ '\n",
|
" PS1='$(pwd>&%d; kill -STOP $$)\\u@\\h:\\w\\$ '\n",
|
||||||
subshell_pipe[WRITE]);
|
subshell_pipe[WRITE]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SHELL_MKSH:
|
case SHELL_MKSH:
|
||||||
|
/* mksh doesn't support \x placeholders neither any "precmd" functionality */
|
||||||
g_snprintf (precmd, buff_size,
|
g_snprintf (precmd, buff_size,
|
||||||
" PS1='$(pwd>&%d; kill -STOP $$)${USER:=$(id -un)}@${HOSTNAME:=$(hostname -s)}:$PWD\\$ '\n",
|
" PS1='$(pwd>&%d; kill -STOP $$)${USER:=$(id -un)}@${HOSTNAME:=$(hostname -s)}:$PWD\\$ '\n",
|
||||||
subshell_pipe[WRITE]);
|
subshell_pipe[WRITE]);
|
||||||
|
Loading…
Reference in New Issue
Block a user