나는 터미널 사용을 좋아하는 사람들 중 하나입니다. 나는 모든 사용자가 GNU / 리눅스 한때 그들은 그것 없이는 살 수 없습니다. 왜냐하면 글자로 가득 찬 그 창은 우리에게 삶을 훨씬 쉽게 만들어주기 때문입니다.
하지만 기본값보다 조금 더 예쁘게 만들 수 있습니다. 이에 대한 예는 다음에서 보거나 다운로드 할 수 있습니다. 그놈 모양. 다음에 보여 드릴 팁은 다음과 같은 모습으로 터미널을 떠나는 것입니다.
보시다시피 실행할 명령 그리고 각 주문 사이에 놓입니다 타임 라인 시스템 시간과 함께.
어떻게합니까?
텍스트 편집기를 엽니 다. (예 Gedit) 그리고 우리는 그것을 안에 넣습니다.
# Fill with minuses
# (this is recalculated every time the prompt is shown in function prompt_command):
fill="--- "
reset_style='\[\033[00m\]'
status_style=$reset_style'\[\033[0;90m\]' # gray color; use 0;37m for lighter color
prompt_style=$reset_style
command_style=$reset_style'\[\033[1;29m\]' # bold black
# Prompt variable:
PS1="$status_style"'$fill \t\n'"$prompt_style"'${debian_chroot:+($debian_chroot)}\u@\h:\w\$'"$command_style "
# Reset color for command output
# (this one is invoked every time before a command is executed):
trap 'echo -ne "\e[0m"' DEBUG
function prompt_command {
# create a $fill of all screen width minus the time string and a space:
let fillsize=${COLUMNS}-9
fill=""
while [ "$fillsize" -gt "0" ]
do
fill="-${fill}" # fill with underscores to work on
let fillsize=${fillsize}-1
done
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
bname=`basename "${PWD/$HOME/~}"`
echo -ne "\033]0;${bname}: ${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"
;;
*)
;;
esac
}
PROMPT_COMMAND=prompt_command
우리는 그것을 우리 안에 보관합니다. 홈 / 이름과 함께 .bash_ps2 예를 들면. 그런 다음 우리는 .bashrc 다음을 추가합니다.
if [ -f "$HOME/.bash_ps2" ]; then
. "$HOME/.bash_ps2"
fi
터미널을 열면 변경 사항을 볼 수 있습니다
본 : 인간.
