$
SHELL.$
SHELL_
4.0.7-5_
i386.deb) ...[
/bin/bash]
:/bin/zsh$
SHELL~
/.zshrc dans le
répertoire de l'utilisateur, ou bien dans le fichier /etc/zshrc. Le script zsh compinstall automatise
l'activation de la complétion. Il se trouve dans le répertoire /usr/share/zsh/<VERSION DE ZSH>/functions/Completion
par défaut sur Debian GNU/Linux.
# cd /usr/share/zsh/` zsh --version | awk -F" " '{ print $ 2} '` /functions/Completion# source compinstall I haven't found any existing completion definitions. If you have some already defined by compinstall, edit the name of the file where these can be found. Note that this will only work if they are exactly the form in which compinstall inserted them. If you leave the line as it is, or empty, I won't search. file> /root/.zshrc Starting a new completion configuration from scratch. This will be written to the new file /root/.zshrc. Note that you will be given a chance to save the new setup somewhere else at the end. --- Hit newline to continue or `q' to exit without saving --- d=/usr/share/zsh/4.0.7/functions/Zle compdir=/usr/share/zsh/4.0.7/functions/Completion subdirs=1 lines='' Completion directories /usr/share/zsh/4.0.7/functions/Completion/* are already in your $ fpath, good.--- Hit newline to continue or `q' to exit without saving --- *** compinstall: main menu *** Note that hitting `q' in menus does not abort the set of changes from lower level menus. However, quitting at top level will ensure that noting at all is actually written out. 1. Completers: choose completion behaviour for tasks such as approximation, spell-checking, expansion. 2. Matching control: set behaviour for case-insensitive matching, extended (partial-word) matching and substring matching. 3. Styles for changing the way completions are displayed and inserted. 4. Styles for particular completions. c. Change context (plus more information on contexts). q. Return without saving. 0. Save and exit. --- Hit choice --- |
*** compinstall: completer menu *** Current context: :completion:* The following completers are available. Those marked `(*)' are already set for the context shown above. If none are selected, the completers will not be set for this context at all. 1. (*) Basic completion. 2. (*) Approximate completion: completion with correction of existing word. 3. (*) Correction: correct existing word, no completion. 4. (*) Expansion: use globbing and parameter substitution, if possible. o. Set options for the completers above. m. Set completers that modify the behaviour of the four main ones above. q. Return without saving. 0. Done setting completers. --- Hit selection --- 1 2 3 4 |
--- Hit choice --- 0
output='' Save new settings to /root/.zshrc? y Successfully added compinstall lines to /root/.zshrc. Set new styles for immediate use? n |
# The following lines were added by compinstall zstyle ':completion:*' completer _ expand _ complete _ correct _ approximatezstyle :compinstall filename '/root/.zshrc' autoload -U compinit compinit # End of lines added by compinstall |
`
ls /home | egrep "[^
ftp,^
lost+found]"` ; do cp /root/.zshrc \
$
i/ &&
chown $
i. /home/$
i/.zshrc ; done~
/.zshrc ou le
fichier /etc/zshrc, et rajouté la ligne suivante :
PROMPT='%
n@%
m%
:[%
~
]%
# '. Maintenant votre prompt devrait
ressembler à quelque chose comme ça : root@samy[~
]# , n'oubliez pas de taper :
# source ~
/.zshrc pour que la modification soit prise en compte immédiatement.
~
mills/ntp/servers.html. Si vous souhaitez modifier le nom du serveur
ultérieurement, il vous suffira de taper la commande suivante afin d'accéder à nouveau à ce menu :%
ls /etc/rc2.d/ | grep "ntpdate"
#! /bin/sh # /etc/ppp/ip-up.d/ntpdate INIT _ SCRIPT=/etc/init.d/ntpdateif [ -x $ INIT_ SCRIPT ]; then$ INIT_ SCRIPT startfi |
#! /bin/sh # /etc/ppp/ip-down.d/ntpdate INIT _ SCRIPT=/etc/init.d/ntpdateif [ -x $ INIT_ SCRIPT ]; then$ INIT_ SCRIPT stopfi |
%
pon. Normalement vous devriez voir
apparaître quelque chose comme ça dans les log (/var/log/syslog) :[
...]
[
...]
_
ntp=`
cat /etc/hosts | grep $
NTPSERVERS | awk 'print $
1'`
$
ip_
ntp -m state --state ESTABLISHED,RELATED -j ACCEPT$
ip_
ntp -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT$
ip_
ntp -m state --state ESTABLISHED,RELATED -j ACCEPT$
ip_
ntp -m state --state NEW,ESTABLISHED,RELATED