Next: , Previous: Renaming Files And Directories, Up: Other Useful CVS Commands


Avoiding Option Fatigue

Most people tire pretty quickly of typing the same option flags with every command. If you know that you always want to pass the -Q global option or you always want to use -c with diff, why should you have to type it out each time?

There is help, fortunately. CVS looks for a .cvsrc file in your home directory. In that file, you can specify default options to apply to every invocation of CVS. Here's an example .cvsrc:

     diff -c
     update -P
     cvs -q

If the leftmost word on a line matches a CVS command (in its unabbreviated form), the corresponding options are used for that command every time. For global options, you just use cvs. So, for example, every time that user runs cvs diff, the -c flag is automatically included.

Karl Fogel wrote this book. Buy a printed copy via his homepage at red-bean.com

copyright  ©  May 20 2019 sean dreilinger url: https://durak.org/sean/pubs/software/cvsbook/Avoiding-Option-Fatigue.html