mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
Define macros for bashrc, ashrc, and inputrc files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
269ace6bf2
commit
0c02118fad
@ -53,6 +53,8 @@
|
|||||||
|
|
||||||
#define MC_BASHRC_FILE "bashrc"
|
#define MC_BASHRC_FILE "bashrc"
|
||||||
#define MC_ZSHRC_FILE ".zshrc"
|
#define MC_ZSHRC_FILE ".zshrc"
|
||||||
|
#define MC_ASHRC_FILE "ashrc"
|
||||||
|
#define MC_INPUTRC_FILE "inputrc"
|
||||||
#define MC_CONFIG_FILE "ini"
|
#define MC_CONFIG_FILE "ini"
|
||||||
#define MC_FILEBIND_FILE "mc.ext"
|
#define MC_FILEBIND_FILE "mc.ext"
|
||||||
#define MC_FILEPOS_FILE "filepos"
|
#define MC_FILEPOS_FILE "filepos"
|
||||||
|
@ -74,9 +74,9 @@ static const struct
|
|||||||
/* data */
|
/* data */
|
||||||
{ &mc_data_str, MC_SKINS_DIR },
|
{ &mc_data_str, MC_SKINS_DIR },
|
||||||
{ &mc_data_str, FISH_PREFIX },
|
{ &mc_data_str, FISH_PREFIX },
|
||||||
{ &mc_data_str, "ashrc" },
|
{ &mc_data_str, MC_ASHRC_FILE },
|
||||||
{ &mc_data_str, "bashrc" },
|
{ &mc_data_str, MC_BASHRC_FILE },
|
||||||
{ &mc_data_str, "inputrc" },
|
{ &mc_data_str, MC_INPUTRC_FILE },
|
||||||
{ &mc_data_str, MC_ZSHRC_FILE },
|
{ &mc_data_str, MC_ZSHRC_FILE },
|
||||||
{ &mc_data_str, MC_EXTFS_DIR },
|
{ &mc_data_str, MC_EXTFS_DIR },
|
||||||
{ &mc_data_str, MC_HISTORY_FILE },
|
{ &mc_data_str, MC_HISTORY_FILE },
|
||||||
|
@ -324,7 +324,7 @@ init_subshell_child (const char *pty_name)
|
|||||||
{
|
{
|
||||||
case SHELL_BASH:
|
case SHELL_BASH:
|
||||||
/* Do we have a custom init file ~/.local/share/mc/bashrc? */
|
/* Do we have a custom init file ~/.local/share/mc/bashrc? */
|
||||||
init_file = mc_config_get_full_path ("bashrc");
|
init_file = mc_config_get_full_path (MC_BASHRC_FILE);
|
||||||
|
|
||||||
/* Otherwise use ~/.bashrc */
|
/* Otherwise use ~/.bashrc */
|
||||||
if (!exist_file (init_file))
|
if (!exist_file (init_file))
|
||||||
@ -341,7 +341,7 @@ init_subshell_child (const char *pty_name)
|
|||||||
{
|
{
|
||||||
char *input_file;
|
char *input_file;
|
||||||
|
|
||||||
input_file = mc_config_get_full_path ("inputrc");
|
input_file = mc_config_get_full_path (MC_INPUTRC_FILE);
|
||||||
if (exist_file (input_file))
|
if (exist_file (input_file))
|
||||||
{
|
{
|
||||||
putenv_str = g_strconcat ("INPUTRC=", input_file, (char *) NULL);
|
putenv_str = g_strconcat ("INPUTRC=", input_file, (char *) NULL);
|
||||||
@ -355,7 +355,7 @@ init_subshell_child (const char *pty_name)
|
|||||||
case SHELL_ASH_BUSYBOX:
|
case SHELL_ASH_BUSYBOX:
|
||||||
case SHELL_DASH:
|
case SHELL_DASH:
|
||||||
/* Do we have a custom init file ~/.local/share/mc/ashrc? */
|
/* Do we have a custom init file ~/.local/share/mc/ashrc? */
|
||||||
init_file = mc_config_get_full_path ("ashrc");
|
init_file = mc_config_get_full_path (MC_ASHRC_FILE);
|
||||||
|
|
||||||
/* Otherwise use ~/.profile */
|
/* Otherwise use ~/.profile */
|
||||||
if (!exist_file (init_file))
|
if (!exist_file (init_file))
|
||||||
|
@ -122,15 +122,15 @@ static const struct test_user_config_paths_ds
|
|||||||
},
|
},
|
||||||
{ /* 11. */
|
{ /* 11. */
|
||||||
CONF_DATA,
|
CONF_DATA,
|
||||||
"ashrc"
|
MC_ASHRC_FILE
|
||||||
},
|
},
|
||||||
{ /* 12. */
|
{ /* 12. */
|
||||||
CONF_DATA,
|
CONF_DATA,
|
||||||
"bashrc"
|
MC_BASHRC_FILE
|
||||||
},
|
},
|
||||||
{ /* 13. */
|
{ /* 13. */
|
||||||
CONF_DATA,
|
CONF_DATA,
|
||||||
"inputrc"
|
MC_INPUTRC_FILE
|
||||||
},
|
},
|
||||||
{ /* 14. */
|
{ /* 14. */
|
||||||
CONF_DATA,
|
CONF_DATA,
|
||||||
|
Loading…
Reference in New Issue
Block a user