Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this questionIm using KUbuntu 10.04 (Lucid Lynx). I ha开发者_Python百科ve installed zsh and screen. I have set zsh as the default shell, by setting Command to zsh in Settings->Edit Current Profile of the terminal. But,when i launch screen,the bash shell is loaded. If i run the command zsh, then zsh starts but the following message is displayed:
"/home/joel/.zshrc:36: Can't add module parameter `mapfile': parameter already exists"
Also,zsh is invoked for only the current screen instance and i have to invoke it manually again for other instances. So,is there any way to make screen load zsh by default and invoke it automatically for every instance ?
Thank You
If you want to make it the default shell for screen sessions only, you can simply add this line to your ~/.screenrc
file.
shell "/usr/bin/zsh"
First locate where is zsh like that:
$ whereis zsh
Second change shell for current user:
$ chsh -s /path/to/zsh joel
And zsh will be default shell for user joel after relogin.
I had a similar problem to you, except in my case I changed the shell vim uses, by specifying set shell=zsh\ --login
in .vimrc. Every time I dropped into a shell via :sh zsh would whine with the same error:
Can't add module parameter `mapfile': parameter already exists
I asked on #vim and #zsh on freenode. Turns out if you run zsh
again within a zsh session, you'll see the same error, and the suggested fix is to simply append &>/dev/null
to your .zshrc file like so:
zmodload -ap zsh/mapfile mapfile &>/dev/null
The zsh mapfile module creates a pseudo-variable which maps filenames to their contents, and is only needed if you have scripts that actually use $mapfile.
It appears to be optional, but it was pointed out that the autoload parameter is there so it only gets loaded when required, so there should be no harm in keeping the line and piping complaints to /dev/null
精彩评论