![]() \[ begin a sequence of non-printing characters, which could be used to embed a terminal control sequence into the prompt ![]() \nnn the character corresponding to the octal number nnn \$ if the effective UID is 0, a #, otherwise a $ \W the basename of the current working directory, with $HOME abbreviated with a tilde \w the current working directory, with $HOME abbreviated with a tilde (uses the value of the PROMPT_DIRTRIM variable) \V the release of bash, version + patch level (e.g., 2.00.0) \A the current time in 24-hour HH:MM format \T the current time in 12-hour HH:MM:SS the current time in 12-hour am/pm format \t the current time in 24-hour HH:MM:SS format \s the name of the shell, the basename of $0 (the portion following the final slash) ![]() \l the basename of the shell's terminal device name \j the number of jobs currently managed by the shell The format is passed to strftime(3) and the result is inserted into the prompt string an empty format results in a locale-specific time representation. \d the date in "Weekday Month Date" format (e.g., "Tue May 26") Bash allows these prompt strings to be customized by inserting a number ofīackslash-escaped special characters that are decoded as follows: 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |