16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

%# > (or the first character of the promptchars shell variable) for<br />

normal users, # (or the second character of promptchars) for the<br />

superuser.<br />

%{string%}<br />

Includes string as a literal escape sequence. It should be used only<br />

to change terminal attributes and should not move the cursor<br />

location. This cannot be the last sequence in prompt.<br />

%? The return code of the command executed just before the prompt.<br />

%R In prompt2, the status of the parser. In prompt3, the corrected<br />

string. In history, the history string.<br />

The bold, standout and underline sequences are often used to distinguish a<br />

superuser shell. For example,<br />

>set prompt = "%m [%h] %B[%@%b [%/] you rang?"<br />

tut [37] [2:54] [/usr/accts/sys] you rang? _<br />

Set by default to %# in interactive shells.<br />

symlinks<br />

Can be set to several different values to control symbolic link (’symlink’)<br />

resolution:<br />

v If set to chase, whenever the current directory changes to a directory<br />

containing a symbolic link, it is expanded to the real name of the<br />

directory to which the link points. This does not work for the user’s home<br />

directory.<br />

v If set to ignore, the shell tries to construct a current directory relative to<br />

the current directory before the link was crossed. This means that cding<br />

through a symbolic link and then cd..’ing returns one to the original<br />

directory. This only affects built-in commands and filename completion.<br />

v If set to expand, the shell tries to fix symbolic links by actually expanding<br />

arguments which look like pathnames. This affects any command, not<br />

just built-ins. Unfortunately, this does not work for hard-to-recognize<br />

filenames, such as those embedded in command options. Expansion<br />

may be prevented by quoting. While this setting is usually the most<br />

convenient, it is sometimes misleading and sometimes confusing when it<br />

fails to recognize an argument which should be expanded. A compromise<br />

is to use ignore and use the editor command normalize-path (bound by<br />

default to ^X-n) when necessary.<br />

Some examples are in order. First, let’s set up some play directories:<br />

> cd /tmp<br />

> mkdir from from/src to<br />

> ln -s from/src to/dist<br />

Here’s the behavior with symlinks unset,<br />

> cd /tmp/to/dist; echo $cwd<br />

/tmp/to/dist<br />

> cd ..; echo $cwd<br />

/tmp/from<br />

here’s the behavior with symlinks set to chase,<br />

> cd /tmp/to/dst; echo $cwd<br />

/tmp/from/src<br />

> cd ..; echo $cwd<br />

/tmp/from<br />

tcsh<br />

Chapter 2. Shell command descriptions 667

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!