I recently started using zsh as my default shell on my Fedora system. Today I installed a fresh CentOS 6.7 system and changed the shell after installing zsh on it for userx using:

[tu3@TestC001 ~]$ chsh -s /bin/zsh

The zsh configuration menu did not appear. So searched the internet and found we can rerun below command to get the zsh configuration menu. So I switched to zsh shell and ran this:

[tu3@TestC001]~% autoload -Uz zsh-newuser-install; zsh-newuser-install -f
[tu3@TestC001]~% echo $?

However, even after doing that the zsh configuration menu is not appearing and echo $? return 1. What am I doing wrong ?


Found the Answer Actually I was not using the terminal in maximized mode and that was creating the issue.

Let me show you:

[tu3@TestC001]~% tput cols
[tu3@TestC001]~% autoload -Uz zsh-newuser-install; zsh-newuser-install  -f

When the terminal was not maximized the command failed without giving any warning or reason, and after sometime I ran the same command in a maximized terminal window (or rather when the number of columns were greater than 71) the command automatically gave me the configuration menu.

[tu3@TestC001]~% tput cols
[tu3@TestC001]~% autoload -Uz zsh-newuser-install; zsh-newuser-install -f
Attempting to extract information from manual pages...
Please pick one of the following options:

(1)  Configure settings for history, i.e. command lines remembered
     and saved by the shell.  (Recommended.)

(2)  Configure the new completion system.  (Recommended.)

(3)  Configure how keys behave when editing command lines.  (Recommended.)

(4)  Pick some of the more common shell options.  These are simple "on"
     or "off" switches controlling the shell's features.

(0)  Exit, leaving the existing ~/.zshrc alone.

(a)  Abort all settings and start from scratch.  Note this will overwrite
     any settings from zsh-newuser-install already in the startup file.
     It will not alter any of your other settings, however.

(q)  Quit and do nothing else.
--- Type one of the keys in parentheses --- q

I think if the command had given me a warning that I was using a small window would have helped the cause and not created so much confusion. Something like what the ncdu command does. Anyways I'm thinking of writing a small patch for this one.

Example of how ncdu command displays a warning incase of small terminal size:

[tu1@TestC001]~% ncdu ~
Warning: terminal too small,
 please either resize your terminal,
 press i to ignore, or press q to quit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.