set

PS1(提示符的设置)

这个东西就是我们的"命令提示符"。当我们每次按下[Enter]按键去执行某个命令后,最后再次出现提示符,就会主动去读取这个变量值了。上面PS1内显示的是一些特殊的符号,这些特殊的符号可以显示不同的信息,每个distributions的bash默认的PS1变量内容可能有些区别,你可以用man bash 查询一下PS1的相关说明,以理解下面的一些符号的意义

PROMPTING

When executing interactively, bash displays the primary prompt PS1 when it is ready to read a command, and the secondary prompt PS2 when it needs more input to complete a command. Bash allows these prompt strings to be customized by inserting a number of backslash-escaped special characters that are decoded as follows:

results matching ""

    No results matching ""