mirror of https://github.com/MidnightCommander/mc
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_ZSHRC_FILE ".zshrc"
|
||||
#define MC_ASHRC_FILE "ashrc"
|
||||
#define MC_INPUTRC_FILE "inputrc"
|
||||
#define MC_CONFIG_FILE "ini"
|
||||
#define MC_FILEBIND_FILE "mc.ext"
|
||||
#define MC_FILEPOS_FILE "filepos"
|
||||
|
|
|
@ -74,9 +74,9 @@ static const struct
|
|||
/* data */
|
||||
{ &mc_data_str, MC_SKINS_DIR },
|
||||
{ &mc_data_str, FISH_PREFIX },
|
||||
{ &mc_data_str, "ashrc" },
|
||||
{ &mc_data_str, "bashrc" },
|
||||
{ &mc_data_str, "inputrc" },
|
||||
{ &mc_data_str, MC_ASHRC_FILE },
|
||||
{ &mc_data_str, MC_BASHRC_FILE },
|
||||
{ &mc_data_str, MC_INPUTRC_FILE },
|
||||
{ &mc_data_str, MC_ZSHRC_FILE },
|
||||
{ &mc_data_str, MC_EXTFS_DIR },
|
||||
{ &mc_data_str, MC_HISTORY_FILE },
|
||||
|
|
|
@ -324,7 +324,7 @@ init_subshell_child (const char *pty_name)
|
|||
{
|
||||
case SHELL_BASH:
|
||||
/* 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 */
|
||||
if (!exist_file (init_file))
|
||||
|
@ -341,7 +341,7 @@ init_subshell_child (const char *pty_name)
|
|||
{
|
||||
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))
|
||||
{
|
||||
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_DASH:
|
||||
/* 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 */
|
||||
if (!exist_file (init_file))
|
||||
|
|
|
@ -122,15 +122,15 @@ static const struct test_user_config_paths_ds
|
|||
},
|
||||
{ /* 11. */
|
||||
CONF_DATA,
|
||||
"ashrc"
|
||||
MC_ASHRC_FILE
|
||||
},
|
||||
{ /* 12. */
|
||||
CONF_DATA,
|
||||
"bashrc"
|
||||
MC_BASHRC_FILE
|
||||
},
|
||||
{ /* 13. */
|
||||
CONF_DATA,
|
||||
"inputrc"
|
||||
MC_INPUTRC_FILE
|
||||
},
|
||||
{ /* 14. */
|
||||
CONF_DATA,
|
||||
|
|
Loading…
Reference in New Issue