저는 oh-my-zsh를 사용하고 있으며 oh-my-zsh 목록에 colord-manpages라는 플러그인이 있습니다.
┌─[shirish@debian] - [~/.oh-my-zsh/plugins] - [10199]
└─[$] ll | grep colored
drwxr-xr-x 2 shirish shirish 4096 2015-12-30 14:27 colored-man-pages
이것은 .zshrc의 출력입니다.
─[$] grep -Ev '#' .zshrc
export ZSH=/home/shirish/.oh-my-zsh
ZSH_THEME="duellj"
plugins=(last-working-dir)
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/lib:/usr/local/include/SDL2"
source $ZSH/oh-my-zsh.sh
이것은 ~/.oh-my-zsh/oh-my-zsh.sh 스크립트의 출력입니다.
[$] grep -v '#' oh-my-zsh.sh
if [ "$DISABLE_AUTO_UPDATE" != "true" ]; then
env ZSH=$ZSH DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT zsh -f $ZSH/tools/check_for_upgrade.sh
fi
fpath=($ZSH/functions $ZSH/completions $fpath)
autoload -U compaudit compinit
: ${ZSH_DISABLE_COMPFIX:=true}
if [[ -z "$ZSH_CUSTOM" ]]; then
ZSH_CUSTOM="$ZSH/custom"
fi
if [[ -z "$ZSH_CACHE_DIR" ]]; then
ZSH_CACHE_DIR="$ZSH/cache"
fi
for config_file ($ZSH/lib/*.zsh); do
custom_config_file="${ZSH_CUSTOM}/lib/${config_file:t}"
[ -f "${custom_config_file}" ] && config_file=${custom_config_file}
source $config_file
done
is_plugin() {
local base_dir=$1
local name=$2
test -f $base_dir/plugins/$name/$name.plugin.zsh \
|| test -f $base_dir/plugins/$name/_$name
}
for plugin ($plugins); do
if is_plugin $ZSH_CUSTOM $plugin; then
fpath=($ZSH_CUSTOM/plugins/$plugin $fpath)
elif is_plugin $ZSH $plugin; then
fpath=($ZSH/plugins/$plugin $fpath)
fi
done
if [[ "$OSTYPE" = darwin* ]]; then
SHORT_HOST=$(scutil --get ComputerName 2>/dev/null) || SHORT_HOST=${HOST/.*/}
else
SHORT_HOST=${HOST/.*/}
fi
if [ -z "$ZSH_COMPDUMP" ]; then
ZSH_COMPDUMP="${ZDOTDIR:-${HOME}}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
fi
if [[ $ZSH_DISABLE_COMPFIX != true ]]; then
if ! compaudit &>/dev/null; then
handle_completion_insecurities
else
compinit -d "${ZSH_COMPDUMP}"
fi
else
compinit -i -d "${ZSH_COMPDUMP}"
fi
for plugin ($plugins); do
if [ -f $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh ]; then
source $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh
elif [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then
source $ZSH/plugins/$plugin/$plugin.plugin.zsh
fi
done
for config_file ($ZSH_CUSTOM/*.zsh(N)); do
source $config_file
done
unset config_file
if [ "$ZSH_THEME" = "random" ]; then
themes=($ZSH/themes/*zsh-theme)
((N=(RANDOM%N)+1))
RANDOM_THEME=${themes[$N]}
source "$RANDOM_THEME"
echo "[oh-my-zsh] Random theme '$RANDOM_THEME' loaded..."
else
if [ ! "$ZSH_THEME" = "" ]; then
if [ -f "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme" ]; then
source "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme"
elif [ -f "$ZSH_CUSTOM/themes/$ZSH_THEME.zsh-theme" ]; then
source "$ZSH_CUSTOM/themes/$ZSH_THEME.zsh-theme"
else
source "$ZSH/themes/$ZSH_THEME.zsh-theme"
fi
fi
fi
zsh를 xterm으로 사용할 때 컬러 매뉴얼 페이지가 작동하도록 하려면 어떻게 해야 하는지 알려주거나 공유할 수 있는 사람이 있습니까?
구글링을 해보았지만 아무것도 찾을 수 없었습니다 :(
답변1
plugins
다음 정의 에 플러그인을 추가하기만 하면 됩니다 .zshrc
.
plugins=(last-working-dir colored-man-pages)
그런 다음 새 셸을 시작하면 플러그인이 활성화된 것을 볼 수 있습니다.