LB7979

Terminal: Prompt, customize

Mar 17th, 2016
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. \a ASCII bell character
  2.  
  3. \d Date in "Tue May 26" format
  4.  
  5. \D{format} 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; braces are required
  6.  
  7. \e ASCII escape character (033)
  8.  
  9. \h Hostname up to the first '.'
  10.  
  11. \H Hostname
  12.  
  13. \j Number of jobs currently managed by the shell
  14.  
  15. \l Basename of the shell’s terminal device name
  16.  
  17. \n Newline
  18.  
  19. \r Carriage return
  20.  
  21. \s Name of the shell, the basename of $0 (the portion following the final slash)
  22.  
  23. \t Time in 24-hour HH:MM:SS format
  24.  
  25. \T Time in 12-hour HH:MM:SS format
  26.  
  27. \@ Time in 12-hour am/pm format
  28.  
  29. \A Time in 24-hour HH:MM format
  30.  
  31. \u Username of current user
  32.  
  33. \v Version of bash (e.g., 2.00)
  34.  
  35. \V Release of bash, version + patch level (e.g., 2.00.0)
  36.  
  37. \w Current directory, with $HOME abbreviated with a tilde
  38.  
  39. \W Basename of current working directory, with $HOME abbreviated with a tilde
  40.  
  41. \! History number of this command
  42.  
  43. \# Command number of this command
  44.  
  45. \$ If the effective UID is 0, a #, otherwise a $
  46.  
  47. \nnn The character corresponding to the octal number nnn
  48.  
  49. \\ Backslash
  50.  
  51. \[ Begin a sequence of non-printing characters, which could be used to embed a terminal control sequence into the prompt
  52.  
  53. \] End a sequence of non-printing characters
Advertisement
Add Comment
Please, Sign In to add comment