[Home]PromptExamples

Home | RecentChanges | Preferences

This page is a collection of prompts that people find useful in tcsh.

 set prompt = "-- %T %n %~ -- \n$ "

...results in a prompt that looks like:

  -- 23:16 lion ~/my/tmp --
  $


I thrive on history, and like to have a short reminder of where I am (like the trailing directory and its parent)

 set prompt = "%B%U%C2%u %h)%b "

...which results in a prompt that looks like:

  my/tmp 21) 

...where the number 21 represents the place in the history buffer.


This

 set prompt = "-- %w, %d %D %T %n %~ -- \n$ "
gives:
 -- Sep, Mon 29 22:48 gps ~/tk8.4.4/generic --
 $


This gives the time (in boldface - I tend to lose track of time), machinename ("Seraph" in my case), and up to three trailing directories. "Set ellipsis" is optional - without it the prompt will count the "hidden" subdirectories. Note that the flanking characters will depend on your $promptchars variable setting.

 set ellipsis
 set prompt = "%# %B%t%b %m:%c03 %#\n$ "

gives (normal):

 % 3:50am Seraph:~ %
 $ 

and (superuser):

 # 3:52am Seraph:~ #
 $ 


I can't stand a prompt that takes more than one line:

 set prompt="%n@%m%B%~%b[%h]%B%T%b%#"

which looks like:

 user@hostpwd[hist]time%

(that is: pwd and the time are in bold, hist is the location to which the current command will be inserted into the history buffer)


Like it colorful:

  set prompt="\n%B%{\033[34m%}[%h] %d %D.%w.%Y %P\n%{\033[31m%}[%n][%m][%~]\n%{\033[30m%}%b"

gives you the follwoing prompt

 [349] Thu 29.Jan.2004 23:00:20

 [$user][$host][`pwd`]

where the first line is in bold blue, the second in bold red, and the input is on the third line... enjoy.


Home | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited June 28, 2004 14:13 (diff)
Search: