Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[patch] Support for custom init file for Zsh subshell #4203

Closed
mc-butler opened this issue Feb 16, 2021 · 7 comments
Closed

[patch] Support for custom init file for Zsh subshell #4203

mc-butler opened this issue Feb 16, 2021 · 7 comments
Assignees
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/4203
Reporter psprint (sg44567@….com)
Keywords zsh, subshell

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.

Note

Original attachments:

@mc-butler
Copy link
Author

Changed by psprint (sg44567@….com) on Feb 16, 2021 at 16:13 UTC

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 18, 2021 at 8:06 UTC (comment 1)

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.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 28, 2021 at 15:11 UTC (comment 2)

  • Milestone changed from Future Releases to 4.8.27
  • Status changed from new to accepted
  • Owner set to andrew_b
  • Branch state changed from no branch to on review

Branch: 4203_custom_zshrc
[319499f6390eef7021e2e20a13ceccb6b06dfab2]

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Mar 13, 2021 at 17:19 UTC (comment 3)

  • Votes set to andrew_b
  • Type changed from defect to enhancement
  • Branch state changed from on review to approved

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Mar 13, 2021 at 17:20 UTC (comment 4)

  • Votes changed from andrew_b to committed-master
  • Status changed from accepted to testing
  • Resolution set to fixed
  • Branch state changed from approved to merged

Merged to master: [26e568c].

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Mar 13, 2021 at 17:24 UTC (comment 5)

  • Status changed from testing to closed

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Jan 10, 2025 at 17:18 UTC (comment 6)

Ticket #2133 has been marked as a duplicate of this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress
Development

No branches or pull requests

2 participants