Ticket #2133 (new enhancement)
[PATCH] Allow user to setup zsh subshell with rc-files
Reported by: | zaytsev | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | Future Releases |
Component: | mc-core | Version: | 4.6.2 |
Keywords: | Cc: | gotar@…, mooffie@… | |
Blocked By: | Blocking: | ||
Branch state: | no branch | Votes for changeset: |
Description
Fordwarded from Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=512056
Package: mc Version: 2:4.6.2~git20080311-4 Severity: wishlist Tags: patch Hi there. I'd like to use zshrc other then default, when zsh starts as mc's subshell. I've just got an idea, that i could use MC_SID env var inside my .zshrc. But anyway, that was too late. I've made small patch to allow users to create ~/.mc/zsh dir which could contain rc-files zsh uses at startup/shutdown. PS I also edited mc(1) to mention this feature, and remove tcshrc which is not really supported.
Attachments
Change History
comment:1 Changed 15 years ago by ossi
this looks incredibly niche to me. you should stick with MC_SID.
comment:2 follow-up: ↓ 3 Changed 15 years ago by zaytsev
It also does look niche to me, but considering tcsh was once (considered to be) supported I don't see any reason to refuse the inclusion of this patch.
comment:3 in reply to: ↑ 2 Changed 15 years ago by ossi
Replying to zaytsev:
that's besides the point. the patch doesn't do anything which cannot be done more generically with already existing facilities. it's a simple matter of "code hygiene" to reject it.
comment:4 Changed 15 years ago by zaytsev
So it was certainly not a matter of "code hygiene" to you to clean up mentions like
/* TODO: Find a way to pass initfile to TCSH and ZSH */
and remove support for bash (who uses it anyway?!) to force the freaking bastards to use $MC_SID, but once someone came up with a patch implementing zsh you want to reject it, right? I don't see any logic in here.
Besides, it's just three lines of very clean and clear code. I did't see any microbes there (I might need to clean my microscope though).
comment:5 Changed 15 years ago by ossi
being ironic/sarcastic makes you look particularly stupid if you fall for an obvious fallacy. ;)
the logic is that i've never looked at that code before.
i would remove the feature for all shells, as it is obviously redundant. it might be wise to release a few versions which warn about an attempt to use the feature before removing any mention of it, though.
comment:6 Changed 15 years ago by zaytsev
So far we've got to opposite views on the issue. Let's see what others think about it.
comment:7 Changed 14 years ago by gotar
I agree such code should be removed for all the shells:
- it's totally bad as it hardcodes path (see #1851),
- it overrides my own ZDOTDIR preventing to load my personal configuration under some non-shell dependant circumstance (existance of a directory).
I'm using zsh myself (it is just superior to bash) and please don't mess with things that are trivial: KISS.
BTW you can find my snippets with screenshots and entire configs (with polish description) at http://jakilinux.org/aplikacje/konsola/zsh-automatyzacja-czynnosci/