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.

-- System Information:
Debian Release: 5.0
  APT prefers testing-proposed-updates
  APT policy: (700, 'testing-proposed-updates'), (700, 'testing'), (670, 
'proposed-updates'), (670, 'stable'), (600, 'unstable'), (550, 'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages mc depends on:
ii  libc6                         2.7-18     GNU C Library: Shared libraries
ii  libglib2.0-0                  2.16.6-1   The GLib library of C routines
ii  libgpm2                       1.20.4-3.1 General Purpose Mouse - shared lib
ii  libslang2                     2.1.3-3    The S-Lang programming library - r

mc recommends no packages.

Versions of packages mc suggests:
pn  arj                        <none>        (no description available)
ii  bzip2                      1.0.5-1       high-quality block-sorting file co
pn  dbview                     <none>        (no description available)
ii  file                       4.26-1        Determines file type using "magic"
ii  lynx                       2.8.7dev9-2.1 Text-mode WWW Browser (transitiona
ii  mime-support               3.44-1        MIME files 'mime.types' & 'mailcap
pn  odt2txt                    <none>        (no description available)
ii  perl                       5.10.0-19     Larry Wall's Practical Extraction 
ii  unzip                      5.52-12       De-archiver for .zip files
pn  xpdf                       <none>        (no description available)
ii  zip                        2.32-1        Archiver for .zip files

-- no debconf information
diff -rNu mc-4.6.2~git20080311/doc/mc.1.in mc-4.6.2~git20080311.patched/doc/mc.1.in
--- mc-4.6.2~git20080311/doc/mc.1.in	2008-02-19 20:25:27.000000000 +0300
+++ mc-4.6.2~git20080311.patched/doc/mc.1.in	2009-01-16 22:44:27.694649019 +0300
@@ -2131,8 +2131,9 @@
 you can specify startup
 commands for the subshell in your ~/.mc/bashrc file and
 special keyboard maps in the ~/.mc/inputrc file.
-.B tcsh
-users may specify startup commands in the ~/.mc/tcshrc file.
+.B zsh
+users may create ~/.mc/zsh and put all zsh rc files there, as
+it will be passed to zsh as $ZDOTDIR (see zsh(1)).
 .PP
 When the subshell code is used, you can suspend applications at any
 time with the sequence C-o and jump back to the Midnight Commander, if
diff -rNu mc-4.6.2~git20080311/src/subshell.c mc-4.6.2~git20080311.patched/src/subshell.c
--- mc-4.6.2~git20080311/src/subshell.c	2008-02-19 20:25:27.000000000 +0300
+++ mc-4.6.2~git20080311.patched/src/subshell.c	2009-01-16 22:33:08.510648931 +0300
@@ -248,9 +248,13 @@
 
 	break;
 
-	/* TODO: Find a way to pass initfile to TCSH and ZSH */
-    case TCSH:
     case ZSH:
+	if (access (".mc/zsh", X_OK) == 0)
+	    putenv ("ZDOTDIR=.mc/zsh");
+	break;
+
+	/* TODO: Find a way to pass initfile to TCSH */
+    case TCSH:
 	break;
 
     default:

Reply via email to