Go to the previous, next section.
There are some command_options
that are used so
often that you might have set up an alias or some other
means to make sure you always specify that option. One
example (1) is that many
people find the default output of the `diff'
command to be very hard to read, and that either
context diffs or unidiffs are much easier to
understand.
The `~/.cvsrc' file is a way that you can add
default options to cvs_commands
within cvs,
instead of relying on aliases or other shell scripts.
The format of the `~/.cvsrc' file is simple. The
file is searched for a line that begins with the same
name as the cvs_command
being executed. If a
match is found, then the remainder of the line is split
up (at whitespace characters) into separate options and
added to the command arguments before any
options from the command line.
If a command has two names (e.g., checkout
and
co
), only the name used on the command line will
be used to match against the file. So if this is the
contents of the user's `~/.cvsrc' file:
log -N diff -u update -P co -P
the command `cvs checkout foo' would not have the `-P' option added to the arguments, while `cvs co foo' would.
With the example file above, the output from `cvs
diff foobar' will be in unidiff format. `cvs diff
-c foobar' will provide context diffs, as usual. Since
diff
doesn't have an option to specify use of
the "old" format, you would need to use the `-f'
option to `cvs' to turn off use of the
`~/.cvsrc' options.
Go to the previous, next section.