[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.2 Backup Files

As of version 1.3, GNU indent makes GNU-style backup files, the same way GNU Emacs does. This means that either simple or numbered backup filenames may be made.

Simple backup file names are generated by appending a suffix to the original file name. The default for this suffix is the one-character string ‘~’ (tilde). Thus, the backup file for ‘python.c’ would be ‘python.c~’.

Instead of the default, you may specify any string as a suffix by setting the environment variable SIMPLE_BACKUP_SUFFIX to your preferred suffix.

Numbered backup versions of a file ‘momeraths.c’ look like ‘momeraths.c.~23~’, where 23 is the version of this particular backup. When making a numbered backup of the file ‘src/momeraths.c’, the backup file will be named ‘src/momeraths.c.~V~’, where V is one greater than the highest version currently existing in the directory ‘src’. The environment variable VERSION_WIDTH controls the number of digits, using left zero padding when necessary. For instance, setting this variable to "2" will lead to the backup file being named ‘momeraths.c.~04~’.

The type of backup file made is controlled by the value of the environment variable VERSION_CONTROL. If it is the string ‘simple’, then only simple backups will be made. If its value is the string ‘numbered’, then numbered backups will be made. If its value is ‘numbered-existing’, then numbered backups will be made if there already exist numbered backups for the file being indented; otherwise, a simple backup is made. If VERSION_CONTROL is not set, then indent assumes the behaviour of ‘numbered-existing’.

Other versions of indent use the suffix ‘.BAK’ in naming backup files. This behaviour can be emulated by setting SIMPLE_BACKUP_SUFFIX to ‘.BAK’.

Note also that other versions of indent make backups in the current directory, rather than in the directory of the source file as GNU indent now does.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by david on December, 15 2008 using texi2html 1.78.