Ticket #4203 (closed enhancement: fixed)
[patch] Support for custom init file for Zsh subshell
Reported by: | psprint | Owned by: | andrew_b |
---|---|---|---|
Priority: | major | Milestone: | 4.8.27 |
Component: | mc-core | Version: | master |
Keywords: | zsh,subshell | Cc: | |
Blocked By: | Blocking: | ||
Branch state: | merged | Votes for changeset: | committed-master |
Description
A subshell Zshell, unlike Bash, will not read ~/.local/share/mc/bashrc – it doesn't have its own rc file support and it ignores bashrc. This patch changes this – ~/.local/share/mc/.zshrc file can be provided so that Zshell reads only it as the user RC file (besides the system rc in /etc).
The implementation sets ZDOTDIR in environment to ~/.local/share/mc if a .zshrc will be found there. It is the only way to point Zsh to an other RC file than the default.
Attachments
Change History
comment:1 Changed 4 years ago by andrew_b
Patch review:
- remove mc_log() calls
- use mc_config_get_data_path() instead of g_path_get_dirname()
- use g_setenv() instead of g_strconcat("ZDOTDIR=", init_file, (char *) NULL)
- fix double free of init_file
- add test for new config file in tests/lib/mcconfig/user_configs_path.c.
comment:2 Changed 4 years ago by andrew_b
- Status changed from new to accepted
- Owner set to andrew_b
- Branch state changed from no branch to on review
- Milestone changed from Future Releases to 4.8.27
Branch: 4203_custom_zshrc
changeset:319499f6390eef7021e2e20a13ceccb6b06dfab2
comment:3 Changed 4 years ago by andrew_b
- Votes for changeset set to andrew_b
- Type changed from defect to enhancement
- Branch state changed from on review to approved
comment:4 Changed 4 years ago by andrew_b
- Status changed from accepted to testing
- Votes for changeset changed from andrew_b to committed-master
- Resolution set to fixed
- Branch state changed from approved to merged
Merged to master: [26e568cd7e5399993c1633414bff8ece72fba8b2].
Note: See
TracTickets for help on using
tickets.