Start using Zsh
% zsh
This is the Z Shell configuration function for new users, zsh-newuser-install.
You are seeing this message because you have no zsh startup files
(the files .zshenv, .zprofile, .zshrc, .zlogin in the directory
~). This function can help you with a few settings that should
make your use of the shell easier.
You can:
(q) Quit and do nothing. The function will be run again next time.
(0) Exit, creating the file ~/.zshrc containing just a comment.
That will prevent this function being run again.
(1) Continue to the main menu.
--- Type one of the keys in parentheses ---
●1
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, creating a blank ~/.zshrc file.
(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. The function will be run again next time.
--- Type one of the keys in parentheses ---
●1
History configuration
=====================
# (1) Number of lines of history kept within the shell.
HISTSIZE=1000 (not yet saved)
# (2) File where history is saved.
HISTFILE=~/.histfile (not yet saved)
# (3) Number of lines of history to save to $HISTFILE.
SAVEHIST=1000 (not yet saved)
# (0) Remember edits and return to main menu (does not save file yet)
# (q) Abandon edits and return to main menu
--- Type one of the keys in parentheses ---
●1
●2
●3
●0
●2
The new completion system (compsys) allows you to complete
commands, arguments and special shell syntax such as variables. It provides
completions for a wide range of commonly used commands in most cases simply
by typing the TAB key. Documentation is in the zshcompsys manual page.
If it is not turned on, only a few simple completions such as filenames
are available but the time to start the shell is slightly shorter.
You can:
(1) Turn on completion with the default options.
(2) Run the configuration tool (compinstall). You can also run
this from the command line with the following commands:
autoload -Uz compinstall
compinstall
if you don't want to configure completion now.
(0) Don't turn on completion.
--- Type one of the keys in parentheses ---
●1
●3
Default editing configuration
=============================
The keys in the shell's line editor can be made to behave either
like Emacs or like Vi, two common Unix editors. If you have no
experience of either, Emacs is recommended. If you don't pick one,
the shell will try to guess based on the EDITOR environment variable.
Usually it's better to pick one explicitly.
# (1) Change default editing configuration
bindkey -e (not yet saved)
# (0) Remember edits and return to main menu (does not save file yet)
# (q) Abandon edits and return to main menu
--- Type one of the keys in parentheses ---
●1
●e
●0
●4
Common shell options
====================
The following are some of the shell options that are most often used.
The descriptions are very brief; if you would like more information,
read the zshoptions manual page (type "man zshoptions").
# (1) Change directory given just path.
# unsetopt autocd (no value set)
# (2) Use additional pattern matching features.
# unsetopt extendedglob (no value set)
# (3) Append new history lines instead of overwriting.
# unsetopt appendhistory (no value set)
# (4) Unmatched patterns cause an error.
# setopt nomatch (no value set)
# (5) Beep on errors.
# setopt beep (no value set)
# (6) Immediately report changes in background job status.
# unsetopt notify (no value set)
# (0) or (q) Return to main menu (no changes made yet)
--- Type one of the keys in parentheses ---
●1
Option autocd: Change directory given just path.
The option autocd is currently unset.
Type:
(s) to set it (turn it on)
(u) to unset it (turn it off)
(n) neither to set or unset it (use shell default: off)
(k) or (q) to keep the current setting:
--- Type a key ---
●s
●2
●s
●3
●s
●4
●s
●5
●s
●6
●s
●0
●0
The function will not be run in future, but you can run
it yourself as follows:
autoload zsh-newuser-install
zsh-newuser-install -f
The code added to ~/.zshrc is marked by the lines
# Lines configured by zsh-newuser-install
# End of lines configured by zsh-newuser-install
You should not edit anything between these lines if you intend to
run zsh-newuser-install again. You may, however, edit any other part
of the file.
Ignore insecure directories and continue [ny]?
●y
- なんかいろいろ聞かれたなぁ….
Last modified: 2007-07-02