Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prompt in csh
- set prompt="here comes the snake "
- %/ - full path
- %~ - used path (follows the cd command)
- %. - relative path from ~
- %c - relative path from ~
- %M - $HOST (machine)
- %m - $HOST | cut -d. -f1 (The hostname up to the first .)
- %n - username
- %? - return value of the last command (echo $?)
- %h - history number of the current command
- %\! - history number of the current command (can be replicated by using the !number command)
- %l - TTY
- %j - The number of jobs
- %t - time (hh:mmAM)
- %@ - time (hh:mmAM)
- %T - time (hh:mm)
- %p - full time (hh:mm:ssAM)
- %P - full time (hh:mm:ss)
- %Y - year yyyy
- %y - year yy
- %W - month
- %w - name of month (Jan, Feb..)
- %D - day
- %d - name of day
- %B - bold, set
- %b - bold, unset
- %U - underline, set
- %u - underline, unset
- %S - standout mode, set
- %s - standout mode, unset
- %$ Expands the shell or environment variable name immediately after the `$'.
- %# `>' (or the first character of the promptchars shell variable) for normal users, `#' (or the second character of promptchars) for the supe? ruser.
- %{string%} Includes string as a literal escape sequence. It should be used only to change terminal attributes and should not move the cursor location. This cannot be the last sequence in prompt.
- %? The return code of the command executed just before the prompt.
- %R In prompt2, the status of the parser. In prompt3, the corrected string. In history, the history string.
- # time ~/folder
- set prompt="%U%T%u %. "
- # user@host:~/folder
- set prompt="%n@%m:%c "
- # user@host:~/folder >
- set prompt="%B%n@%m:%c >%b "
- # user@host:~/folder 37>
- set prompt="%B%n@%m:%c %h>%b "
Advertisement
Add Comment
Please, Sign In to add comment