난 내 작업 시간을 보내고 터미널 에뮬레이터 대부분의 유닉스 환경에서 및 사용. 내가 할 수 있기 때문에 더 컬러 색상을 사용하여 명령줄의 출력물에는 유용하고 편리한.
어떤 선택을 내 털미널 색상을 추가할 수 있는 환경이 가상화되었습니까? 어떤 아이는 사용하고 있습니까? 특히 어떤 접할 수 있습니까?
죄송합니다. 컬러 단말기 유형, OS, 용어 설정에 따라 다릅니다 대한 지원, 유틸리티, 갈레라 컴퍼니 구축, etc.
내 설치 후, 많은 실험을 통해 팁입니다.
= $ {} & # 39, & # 39 LS_OPTS 앨리어스가 ls, ls
[데비안]: http://www.debian.org/doc/manuals/reference/ch09.en.html # _colorized_commands
다음은 몇 가지 일을 할 수 있습니다.
또한 강조표시할 구문을 사용하여 코드 진단트리로 털미널 [피그멘츠] (http://pygments.org/faq/ # 피그멘츠 어떻게 사용할 수 있습니까?) 를 명령줄이 목석같은놈.
그렙 * '자동' 강조표시합니다 그렙 - color = 모든 경기에 출전하였다. '= & # 39 GREP_OPTIONS 익스포트합니다 사용할 수도 있습니다. - color = auto& # 39,' 을 영구 앨리어스를 없이 만들 수 있습니다. # 39, ll, it& 색상 사용하는 경우 '=' 항상 사용할 경우에도 란색이며 파이핑을, 어떤 인간으로 전지전능하심이라
ls *
ls - color = '항상'
색계열 지정된:
export LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33'
(힌트: '' 디르크로스 도움이 될 수 있습니다)
PS1='\e[33;1m\u@\h: \e[31m\W\e[0m\$ '
이르게 한 PS1 다음과 같습니다.
[노란색] lucas@ubuntu: [빨간색] ~ [일반] $
정말 창의적인 대체하십시오 얻을 수 있습니다. 표시됨과 메시지:
PS1='\e[s\e[0;0H\e[1;33m\h \t\n\e[1;32mThis is my computer\e[u[\u@\h: \w]\$ '
는 맨 위에 표시줄에는 너회의 털미널 일부 임의적입니까 정보. (최상의 결과를 위해, 또한 list. '앨리어스가 선택해제합니다 = ", 에코 - e & # 39, \e [2J\n\n& " # 39;;').
무슨 일 있으면 란색이며 출력할 때, 나는 don& 고정되었습니다. # 39, sed 't want it to use this' 라인 스트립 이스케이프 시퀀스:
sed "s/\[^[[0-9;]*[a-zA-Z]//gi"
스케쳐내 실제 경험을 더 선 '로 시작하는 \e 없앨 수도 있습니다. [8m' 수 있는 텍스트 숨김니다 털미널 지시합니다. (아님 널리 지원되는.)
sed "s/^\[^[8m.*$//gi"
또한 그러한 [s 실제, ipv6-literal. 합니다 [s. ^ ^ 눌러서 입력할 수 있습니다 ^ ^ V [bash, 즉 kbd> Ctrl< /kbd> <;;; + <;;;;;; Ctrl< kbd> V< /kbd> < kbd> /kbd>. + < kbd> [< /kbd>.;;
난 또 사용:
export TERM=xterm-color
export GREP_OPTIONS='--color=auto' GREP_COLOR='1;32'
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
만일 당신의 마음에 드는 색상화 프롬프트합니다, 정의 색상을 var 유용할 수 있습니다.
export COLOR_NC='\e[0m' # No Color
export COLOR_WHITE='\e[1;37m'
export COLOR_BLACK='\e[0;30m'
export COLOR_BLUE='\e[0;34m'
export COLOR_LIGHT_BLUE='\e[1;34m'
export COLOR_GREEN='\e[0;32m'
export COLOR_LIGHT_GREEN='\e[1;32m'
export COLOR_CYAN='\e[0;36m'
export COLOR_LIGHT_CYAN='\e[1;36m'
export COLOR_RED='\e[0;31m'
export COLOR_LIGHT_RED='\e[1;31m'
export COLOR_PURPLE='\e[0;35m'
export COLOR_LIGHT_PURPLE='\e[1;35m'
export COLOR_BROWN='\e[0;33m'
export COLOR_YELLOW='\e[1;33m'
export COLOR_GRAY='\e[0;30m'
export COLOR_LIGHT_GRAY='\e[0;37m'
그리고 내 프롬프트합니다 이 같은 일이 있다.
case $TERM in
xterm*|rxvt*)
local TITLEBAR='\[\033]0;\u ${NEW_PWD}\007\]'
;;
*)
local TITLEBAR=""
;;
esac
local UC=$COLOR_WHITE # user's color
[ $UID -eq "0" ] && UC=$COLOR_RED # root's color
PS1="$TITLEBAR\n\[${UC}\]\u \[${COLOR_LIGHT_BLUE}\]\${PWD} \[${COLOR_BLACK}\]\$(vcprompt) \n\[${COLOR_LIGHT_GREEN}\]→\[${COLOR_NC}\] "
$ (베스파럼프트) 는 파이썬 스크립트를 ~ / sbin 인쇄하는 버전 관리 정보를 내 전화를 걸어 현재 패스. Cvs, Svn, 머큐리얼, 깃 (git) 등 it 에 대한 지원이 포함되어 있습니다. 작성자입니다 스크립트입니다 는 출처 여기.
이것은 전체 소스 내 프롬프트합니다 구성:
이미 언급한 '와' ls ',' 그렙 확인표시를 많은 색계열 체크아웃하려고 [일반 콜로이저] [1], 초기 색상화 있지만, 당시 주로 로그 파일을 바로 ',' 또 '핑할 색상을 입힙니다 traceroute', '', 'make', 'mgcc netstat', '비교', '마지막', 'ladap' 및 'cvs'.
(브트와 설치하는 통해 이를 '시냅스', '포장' 로 검색 할 수 있어 더 나은 운빨이야 grc" ";)
[1]: http://korpus.juls.savba.sk/ ~ garabik/software/grc.html
이를 통해 내 PS1 프롬프트합니다 같습니다. enter 이미지 여기에 설명을!
시간과 함께 빨간색으로, 깃 (git) 에 있는 어두운 파랑, 녹색, 컴퓨터 이름, 비밀번호 sername 연파란색 지사급 노란색으로.
내 PS1 프롬프트합니다 것이 특징이다.
깃 (git) - fs@snapa 지사급! & # 39 - 긴 디렉터리 경로 (6 개 이상의 요소를) 가 trimmed& # 39;; 상위 3 위, 아래 3 과 (와) '사이의 표시하십시오 디렉터리용 _' 어졌다면 (that&' pwd 's # 39, sed 일부가 위치).
'내' 에서 관련 흐름선 이바시르 파일 다음과 같습니다.
git_branch () { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'; }
HOST='\033[02;36m\]\h'; HOST=' '$HOST
TIME='\033[01;31m\]\t \033[01;32m\]'
LOCATION=' \033[01;34m\]`pwd | sed "s#\(/[^/]\{1,\}/[^/]\{1,\}/[^/]\{1,\}/\).*\(/[^/]\{1,\}/[^/]\{1,\}\)/\{0,1\}#\1_\2#g"`'
BRANCH=' \033[00;33m\]$(git_branch)\[\033[00m\]\n\$ '
PS1=$TIME$USER$HOST$LOCATION$BRANCH
PS2='\[\033[01;36m\]>'
Ls 를 함께 사용할 수 있을 때 오류가 없고 색계열 않을 때 (즉, OSX):
ls --color=al > /dev/null 2>&1 && alias ls='ls -F --color=al' || alias ls='ls -G'
색을 맨페이지 ([자세한 내용] (https://unix.stackexchange.com/q/108699/docs-for-less-termcap-vars):
function _colorman() {
env \
LESS_TERMCAP_mb=$(printf "\e[1;35m") \
LESS_TERMCAP_md=$(printf "\e[1;34m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[7;40m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[1;33m") \
"$@"
}
function man() { _colorman man "$@"; }
function perldoc() { command perldoc -n less "$@" |man -l -; }
GREP_OPTS='--color=auto' # for aliases since $GREP_OPTIONS is deprecated
GREP_COLOR='1;32' # (legacy) bright green rather than default red
GREP_COLORS="ms=$GREP_COLOR" # (new) Matching text in Selected line = green
alias grep='grep $GREP_OPTS'
alias egrep='egrep $GREP_OPTS'
alias fgrep='fgrep $GREP_OPTS'
# use the config at ~/.dircolors if it exists, otherwise generate anew
eval "$( dircolors --sh $(ls -d ~/.dircolors 2>/dev/null) )"
# Usage: _ls_colors_add BASE NEW [NEW...]
# Have LS color given NEW extensions the way BASE extension is colored
_ls_colors_add() {
local BASE_COLOR="${LS_COLORS##*:?.$1=}" NEW
if [ "$LS_COLORS" != "$BASE_COLOR" ]; then
BASE_COLOR="${BASE_COLOR%%:*}"
shift
for NEW in "$@"; do
if [ "$LS_COLORS" = "${LS_COLORS#*.$NEW=}" ]; then
LS_COLORS="${LS_COLORS%%:}:*.$NEW=$BASE_COLOR:"
fi
done
fi
export LS_COLORS
}
_ls_colors_add zip jar xpi # archives
_ls_colors_add jpg ico JPG PNG webp # images
_ls_colors_add ogg opus # audio (opus now included by default)
CLICOLOR=1 # BSD auto-color trigger (like ls -G but for everything)
if ls -ld --color=auto / >/dev/null 2>&1
then alias ls="ls -ph --color=auto"
else alias ls="ls -ph"
fi
# using this as a variable allows easier calling down lower
export GRC='grc -es --colour=auto'
# loop through known commands plus all those with named conf files
for cmd in g++ head ld ping6 tail traceroute6 `locate grc/conf.`; do
cmd="${cmd##*grc/conf.}" # we want just the command
# if the command exists, alias it to pass through grc
type "$cmd" >/dev/null 2>&1 && alias "$cmd"="$GRC $cmd"
done
# This needs run-time detection. We even fake the 'command not found' error.
configure() {
if [[ -x ./configure ]]; then
colourify ./configure "$@"
else
echo "configure: command not found" >&2
return 127
fi
}
# GRC plus LS awesomeness (assumes you have an alias for ls)
unalias ll 2>/dev/null
if ls -ld --color=always / >/dev/null 2>&1; then GNU_LS="--color=always"; fi
ll() {
if [[ -t 1 ]] || [[ -n "$CLICOLOR_FORCE" ]]
then colourify ls -l $GNU_LS "$@"
else ls -l "$@"
fi
}
#!/usr/bin/perl
use strict;
use warnings;
open (DIFF, "-|", "diff", @ARGV) or die $!;
my $ydiff = 1;
while (<DIFF>) {
if (not -t 1) {
print;
next;
}
chomp;
$ydiff = 0 if /^[ <>\@+-]/ or ($. == 1 && /^\d+[a-z]{1,5}\d+$/);
my $color = "";
if (! $ydiff && /^[\@+-<>]/) {
$color = (/^[<-](?!--$)/ ? 1 : /^[+>]/ ? 2 : 5);
} elsif ($ydiff && /\t {6}([<|>])(?:\t|$)/) {
$color = ($1 eq "<" ? 1 : $1 eq ">" ? 2 : 4);
}
$color ? printf ("\e[1;3%dm%s\e[0;0m\n",$color,$_) : print "$_\n";
}
close DIFF;
# Shorten home dir, cygwin drives, paths that are too long
if [ -d /cygdrive ] && uname -a |grep -qi cygwin; then CYGWIN_OS=1; fi
function PSWD() {
local p="$*" space A B cols="${COLUMNS:-`tput cols 2>/dev/null || echo 80`}"
p="${p/$HOME/\~}" # shrink home down to a tilde
if [ -n "$CYGWIN_OS" ] && [ "${p#/cygdrive/?/}" != "$p" ]; then
p="${p:10:1}:${p:11}" # /cygdrive/c/hi -> c:/hi
fi
space="$((${#USER}+${#HOSTNAME}+6))" # width w/out the path
if [ "$cols" -lt 60 ]; then echo -n "$N "; space=-29; p="$p$N\b"; fi
if [ "$cols" -lt "$((space+${#p}+20))" ]; then # < 20 chars for the command
A=$(( (cols-20-space)/4 )) # a quarter of the space (-20 for cmd)
if [ $A -lt 4 ]; then A=4; fi # 4+ chars from beginning
B=$(( cols-20-space-A*2 )) # half (plus rounding) of the space
if [ $B -lt 8 ]; then B=8; fi # 8+ chars from end
p="${p:0:$A}..${p: -$B}"
fi
echo "$p"
}
PSC() { echo -ne "\[\033[${1:-0;38}m\]"; }
PR="0;32" # default color used in prompt is green
if [ "$(id -u)" = 0 ]; then
sudo=41 # root is red background
elif [ "$USER" != "${SUDO_USER:-$USER}" ]; then
sudo=31 # not root, not self: red text
else sudo="$PR" # standard user color
fi
PROMPT_COMMAND='[ $? = 0 ] && PS1=${PS1[1]} || PS1=${PS1[2]}'
PSbase="$(PSC $sudo)\u$(PSC $PR)@\h $(PSC 33)\$(PSWD \w)"
PS1[1]="$PSbase$(PSC $PR)\$ $(PSC)"
PS1[2]="$PSbase$(PSC 31)\$ $(PSC)"
PS1="${PS1[1]}"
unset sudo PR PSbase
볼드 / 설정 컬러 프롬프트합니다. From cyberciti.biz 및 바시파크
# 'tput bold' will work regardless of the foreground and background colors.
# Place the tput output into variables, so they are only execd once.
bold=$(tput bold) # This could also be a color.
reset=$(tput sgr0)
export PS1="\u@\[$bold\]\h\[$reset\]:\w \$ "
# Set some options, based on the OS
OS=`uname -s`
case "$OS" in
"SunOS" )
# Solaris ls doesn't allow color, so use special characters
LS_OPTS='-F'
alias ls='ls ${LS_OPTS}'
;;
"Linux" )
# GNU ls supports colors!
# See dircolors to customize colors
export LS_OPTS='--color=auto'
alias ls='ls ${LS_OPTS}'
# Get color support for 'less'
export LESS="--RAW-CONTROL-CHARS"
# Use colors for less, man, etc.
[[ -f ~/.LESS_TERMCAP ]] && . ~/.LESS_TERMCAP
export GREP_OPTIONS="--color=auto"
;;
"Darwin"|"FreeBSD")
# Most FreeBSD & Apple Darwin supports colors
export CLICOLOR=true
# Get color support for 'less'
export LESS="--RAW-CONTROL-CHARS"
# Use colors for less, man, etc.
[[ -f ~/.LESS_TERMCAP ]] && . ~/.LESS_TERMCAP
export GREP_OPTIONS="--color=auto"
;;
* )
echo "Unknown OS [$OS]"
;;
esac
여기에 이미 셨으며 적이 없는 것 "이라고 말했다.
네 미완성 혹은 미개봉 작품 수 있으며, 이 요하네스 Schl& # gcc 와 색상화 출력물에는 의해 콜로리치 ter 252.
색상화 로깅합니다 멀티일 수 있습니다
내가 함께 넣을 수 있는 색상화 stdout, 스콜
개인적으로 이 &solarisdvd 스콜 목석같은놈.
#normal=$(tput sgr0) # normal text
normal=$'\e[0m' # (works better sometimes)
bold=$(tput bold) # make colors bold/bright
red="$bold$(tput setaf 1)" # bright red text
green=$(tput setaf 2) # dim green text
fawn=$(tput setaf 3); beige="$fawn" # dark yellow text
yellow="$bold$fawn" # bright yellow text
darkblue=$(tput setaf 4) # dim blue text
blue="$bold$darkblue" # bright blue text
purple=$(tput setaf 5); magenta="$purple" # magenta text
pink="$bold$purple" # bright magenta text
darkcyan=$(tput setaf 6) # dim cyan text
cyan="$bold$darkcyan" # bright cyan text
gray=$(tput setaf 7) # dim white text
darkgray="$bold"$(tput setaf 0) # bold black = dark gray text
white="$bold$gray" # bright white text
그래서 나는 내 스크립트에만 이러한 변수를 사용할 것
echo "${red}hello ${yellow}this is ${green}coloured${normal}"
난 또 이렇게 리틀이에요 함수은 콜로레데코 (발견된 스택 오버플로입니다)
function coloredEcho(){
local exp=$1;
local color=$2;
if ! [[ $color =~ '^[0-9]$' ]] ; then
case $(echo $color | tr '[:upper:]' '[:lower:]') in
black) color=0 ;;
red) color=1 ;;
green) color=2 ;;
yellow) color=3 ;;
blue) color=4 ;;
magenta) color=5 ;;
cyan) color=6 ;;
white|*) color=7 ;; # white or invalid color
esac
fi
tput setaf $color;
echo $exp;
tput sgr0;
}
coloredEcho "This text is green" green
더 링크 를 미허용 죄송합니다.
Diff 를 보기 위해 사용하는 색상으로 출력입니다 코로디프.
sudo apt-get install colordiff
파이프 모든 diff 형식 출력입니다 salesforce. 코로디프:
대신에, 만약 기도하였나니 독립형 (그러는데 아무 것도 없이 그곳으로) # 39, & # 39 diff& 그런 역할을 하고, 주위에서 래퍼 및 색을 출력입니다. & # 39 를 앨리어스가 업그레이드됨 내가 다 내 이바시르 diff& # 39;; 를 코로디프.
# if colordiff is installed, use it
if type colordiff &>/dev/null ; then
alias diff=colordiff
그냥 똑같은 물었다. 하지만, 나는 내 자신의 외곽진입 I& # 39 m 대안을 찾고.
배시 (bash 래퍼 및 파이프 (pipe) '프로그램을 중심으로 그들의 출력입니다 써는 페이징됩니다 표시되어도 sed'. Sed '에코' 왓 아이 라이크 어바웃 것이라는 게 바로 수정 및 각 라인 = >. 버퍼링 별로 없다. 하지만, 제가 싫어하는 모든 후속 프로그램인 '코드' 의 랩된 sed 해석되어 컴파일됨.
예를 들어 이게 나는한다 컬러 출력을 'ip':
#
# Colorcodes
#
NORMAL=`echo -e '\033[0m'`
RED=`echo -e '\033[31m'`
GREEN=`echo -e '\033[0;32m'`
LGREEN=`echo -e '\033[1;32m'`
BLUE=`echo -e '\033[0;34m'`
LBLUE=`echo -e '\033[1;34m'`
YELLOW=`echo -e '\033[0;33m'`
#
# command: ip
# highlight ip addresses, default route and interface names
#
IP4=$GREEN
IP6=$LBLUE
IFACE=${YELLOW}
DEFAULT_ROUTE=$LBLUE
IP_CMD=$(which ip)
function colored_ip()
{
${IP_CMD} $@ | sed \
-e "s/inet [^ ]\+ /${IP4}&${NORMAL}/g"\
-e "s/inet6 [^ ]\+ /${IP6}&${NORMAL}/g"\
-e "s/^default via .*$/${DEFAULT_ROUTE}&${NORMAL}/"\
-e "s/^\([0-9]\+: \+\)\([^ \t]\+\)/\1${IFACE}\2${NORMAL}/"
}
alias ip='colored_ip'
나는 이 설정을 위한 프롬프트합니다 내 이바시르 절실해졌습니다.
#Set variables for foreground colors
fgRed=$(tput setaf 1) ; fgGreen=$(tput setaf 2) ; fgBlue=$(tput setaf 4)
fgMagenta=$(tput setaf 5) ; fgYellow=$(tput setaf 3) ; fgCyan=$(tput setaf 6)
fgWhite=$(tput setaf 7) ; fgBlack=$(tput setaf 0)
#Set variables for background colors
bgRed=$(tput setab 1) ; bgGreen=$(tput setab 2) ; bgBlue=$(tput setab 4)
bgMagenta=$(tput setab 5) ; bgYellow=$(tput setab 3) ; bgCyan=$(tput setab 6)
bgWhite=$(tput setab 7) ; bgBlack=$(tput setab 0)
#Set variables for font weight and text decoration
B=$(tput bold) ; U=$(tput smul) ; C=$(tput sgr0)
#NOTE: ${C} clears the current formatting
if [[ $USER = "root" ]]; then
PS1="${B}${fgRed}\u${C}@\h(\s): ${fgGreen}\w${C} > "
else
PS1="${B}${fgCyan}\u${C}@\h(\s): ${fgGreen}\w${C} > "
fi
따라서 이 같은 일이 내게 보이는 프롬프트합니다.
user@host(bash): ~/bin >
작업 디렉터리는 녹색으로. 그리고 사용자 이름 굵은체인지 셸 (를) '및' 인데, sudo 실행했음 시안색 않는 이상 좀 사용자 이름 (root" ";) 표시합니다. 굵은체의 및 빨강입니다.
개인적으로 꼭 한 번 못 서식 설정 때문에 제어 문자 코드를 통해 판독값 com/go/4e6b330a_kr 저장됩니까 프롬프트합니다 간편해집니다. 또한 편집하기를 수 많은 프롬프트합니다 간편해집니다.
그 이유는 내가 사용하는 것은 전 세계 어디서나 사용할 수 있어야 한다 '' 스푸스 it& # 39, 033 [01, 31m] '이상한' 보다 더 추가한다. 또한 보너스로 '에코' 의 경우 $ PS1 프롬프트합니다, 그 대신 색계열 를 이해할 수 없는 제어입니다 시퀀스에만 기초형상 프롬프트합니다 볼 수 있습니다.
또한, 이 프로젝트에 대한 색상화 스크립트에만 출력입니다 시도할 수 있도록 release. 스크리프티코콜러 소스에서 대장간: http://scriptechocolor.sourceforge.net/
ex.
echoc "@{lr}text output in light red"
echoc "@{bLGu}text outpus in blue, light green background and underlined"
echoc "you @{lr} can @{bLGu} mix @{-a} it all too"
echoc -x "ls" #executes ls command and colorizes it automatically to be easy to be seen
자동 색계열 구성할 수 있습니다.
이 예는 처리할 수 있다. enter 이미지 여기에 설명을!
You give it a 그룹, 그 뒤에 있는 regex ᄂ씨 쉼표로 구분된 목록니다 ᄂ씨 색계열. 모든 텍스트를 일치하는 그룹화할 해당 색상 표시됩니다.
예를 들어, 만약 you& # 39, re 보면 몇 가지 테스트 출력:
python -m unittest discover -v
! [무색 출력입니다 일부 파이썬 유니테스테스] [2]
그런 다음 가문비나무속 it up with:
python -m unittest discover -v 2>&1 | colout '(.*ERROR$)|(.*FAIL$)|(\(.*\))' red,yellow,black bold
Regex 는 어떻게 내 3 개의 그룹 (괄호를) 뒤에 3 색 (그리고 경우에 따라 세 가지 스타일이 있지만 I& # 39, ve 사용한 대표 설정할 수 있는 모든 색상을 & # 39, & # 39 bold& # 39, 따라서 black& # 39;; 어두운 회색, 텍스트 등 그룹 일치하는 브래킷에 나옵니다.)
또한, 1 ',' 내가 어떻게 추가 했습니다 2> & 끝까지 호출, 파이썬, 그래서 유니테스트 출력을 때문에 어떻게 할 수 있도록 표준에러출력 켜있을 전출요 迈向 stdout 파이프 안으로 집어 콜우스.
이는 대개 새로 만드는 작업을 편리하게 사용할 수 있습니다 제가 자주 내 자신을 찾을 콜우스 호출 또는 수정 및 재사용합니다 벌로부터 그들을 내 명령줄이 기록.
이 같은 것이 아니라 파이썬 패키지 않했노라 유일한 문제 때문에 독립 실행 파일, 또는 'sudo 파이썬 (setup.py) 를 사용하여 해당 설치' 등을 설치해야 합니다.
내가 찾을 솔라리 유용합니다. 그 후에 한 프로젝트 일관된 색을 많은 애플리케이션을.
http://ethanschoonover.com/solarized https://github.com/altercation/solarized
내가 사용하는 [색상 래퍼] [1].
>. cw 는 유닉스 기반 실시간 ANSI 색상을 비침투성 일반적인 래퍼 명령 GNU / 리눅스. cw 시뮬레이션하려면 고안되었습니다 환경 & # 39 한 유형, 명령 실행 중인 도왔으매 경우, & # 39, & # 39 df& du& # 39,,, # 39 ping& # 39 상술합니다. 그들의 쉘로 따라 실시간으로 자동 색상 출력물에는 방침이다. 정의를 위해 필요한 참조색 포함된 파일 포맷. cw 에 대한 지원 와일드카드 해당되어서는 컬러링, 컬러링, 토큰 화 / 바닥글을 헤더도, 케이스 시나리오 컬러링, 명령행을 종속적입니다 정의를 포함하고 있어 50 개 이상의 컬러링 살 수도 정의 파일.
내가 찾은 것은 거의 완벽한, 그러나 일단 한번 있는 ps 대화형 쉘로 다른 출력 되돌려줍니다 비교 ps 파이프.
[1]: http://cwrapper.sourceforge.net/, 컬러 " wrapper".
예를 들면 다음과 같습니다.
'에코 " $ $ $ {}, ta (노란색) 이 Git 리포 CUR_REPO ta (off) ta (녹색),' ta (off) 는 " 최신품이다 $ $
또는 심지어 짧은:
'에코 " $ $ $ {} 이고 리포 깃 (git) ta (y) ta (f) 는 CUR_REPO ta (g) ta (f),' " 최신품이다 $ $
또는 대체.
이 Git 리포 " '타라이트 "; $ {} @f @y CUR_REPO ". " 있다. '\n" @g 최신품이다 @f ";
뭔가 부여하느뇨 다음과 같습니다.
현재 이 라이브러리를 별도로 D, C, C++, 파이썬 언어로 사용할 수 있는 4 곳에서 코먼드라인 중에서 사용할 좋아하는 쉘입니다.
단, 다른 프로그램을 자동으로 콜로우리지 출력물에는 않는다. 유틸리티 기억하기 위해 도움이 되는 것이 없다는 난해한 코드. 경우에만 사용해야 하는 cmyk w (하이트) 또는 그 이름을 명백하네 란색이며 쉽게 기억하기 rgb (of) f 약어.
자세한 내용은 dell. [이 테스테드 리포] (https://github.com/jamadagni/textattr/).
네 저는 비활성으로 하려면 '' 화려한 마찬가지로 2 단계만으로 따라야 하는 것이 좋습니다
>. 주요 단계에서 링크:
>. 1. 편집할지 ~ /.vimrc 파일을 입력하여 명령: /.vimrc vi ~
>. 2. Ption:*syntax 덮어쓰기/추가 대한 다음
>. 3. 파일 저장 후 닫으십시오
>. 4. 테스트 실행하여 이 비활성으로 명령: 비활성으로 foo.sh