.bashrc
以下の部分に示されている私のubuntuに書かれていることを理解するのが少し難しいです。ここに私が理解していないものがあります:
中括弧と
-
/の+
後に使用される記号の目的は何:
ですか? (例: ${debian_chroot:-} と ${debian_chroot:+($debian_chroot)})eval
コマンド。次のコード スニペットのしくみ。
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) fi if [ "$color_prompt" = yes ]; then PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' else PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' fi