55
edits
No edit summary |
|||
| (6 intermediate revisions by 3 users not shown) | |||
| Line 21: | Line 21: | ||
zsh has some system escape sequences which can be used in your command prompt also. These sequences are special characters which relate to system properties. They can be included in your command prompts to make your prompt more dynamic. Some of the common escape sequences are: | zsh has some system escape sequences which can be used in your command prompt also. These sequences are special characters which relate to system properties. They can be included in your command prompts to make your prompt more dynamic. Some of the common escape sequences are: | ||
{| border="1" cellpadding="2" | {| border="1" cellpadding="2" | ||
| Line 48: | Line 49: | ||
|Your current tty e.g. pts/100 || %l | |Your current tty e.g. pts/100 || %l | ||
|} | |} | ||
Including these in your command prompt exports allows you to have a clock on your command prompt which updates every time you press return, and you can see your current working directory to save you typing "pwd" every time you forget where you are. e.g. | Including these in your command prompt exports allows you to have a clock on your command prompt which updates every time you press return, and you can see your current working directory to save you typing "pwd" every time you forget where you are. e.g. | ||
| Line 60: | Line 62: | ||
At this point it gets a little more complicated. But with a little perseverance you can have your own customised and coloured account. The following are the escape sequences for creating the coloured text. | At this point it gets a little more complicated. But with a little perseverance you can have your own customised and coloured account. The following are the escape sequences for creating the coloured text. | ||
{| border="1" cellpadding="2" | {| border="1" cellpadding="2" | ||
| Line 87: | Line 90: | ||
|Back to normal || %{\e[0m%} | |Back to normal || %{\e[0m%} | ||
|} | |} | ||
Here's the tricky part. These colour escapes sequences have to be printed to the prompt within the export command. | Here's the tricky part. These colour escapes sequences have to be printed to the prompt within the export command. | ||
| Line 134: | Line 138: | ||
So say I'm the only person in your .friends file whose username begins with "c". Typing "ps -fU | So say I'm the only person in your .friends file whose username begins with "c". Typing "ps -fU r<-TAB->" will auto-complete to "ps -fU receive" (NB* this will also work for an alias of that command if you have one set). This can be convenient if you have a list of commands that you use on a regular basis for which aliases would be unsuitable. | ||
zsh message (exporting ARGV0) | zsh message (exporting ARGV0) | ||
== Removing the help message == | |||
Everytime you sign into redbrick, you get the help message. <br> | |||
If you're tired of seeing this all you need to do is add a file called .nohelp in your home directory. You can use the touch command to create a blank file. | |||
receive@murphy (~) % touch .nohelp | |||
== Customised zsh messages == | == Customised zsh messages == | ||
| Line 168: | Line 179: | ||
If you have any problems or mess something up and need help, just talk to [[Helpdesk]]. | If you have any problems or mess something up and need help, just talk to [[Helpdesk]]. | ||
[[Category:Helpdesk]] | |||