Page MenuHomeFreeBSD

indent(1): respect SIMPLE_BACKUP_SUFFIX environment variable
ClosedPublic

Authored by kevans on May 26 2017, 4:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 30 2024, 11:11 AM
Unknown Object (File)
Jan 2 2024, 3:23 PM
Unknown Object (File)
Dec 20 2023, 7:36 AM
Unknown Object (File)
Dec 16 2023, 1:09 PM
Unknown Object (File)
Dec 13 2023, 5:59 PM
Unknown Object (File)
Nov 14 2023, 2:26 AM
Unknown Object (File)
Nov 11 2023, 7:57 AM
Unknown Object (File)
Nov 9 2023, 6:03 PM
Subscribers

Details

Summary

Address a personal nit: indent(1) defaults to using ".BAK" as the suffix
for backup files. This is the most inconvenient part of some of my workflow, so
allow it to be made consistent with the SIMPLE_BACKUP_SUFFIX environment variable.

Test Plan

Ensure tests still pass and that the default suffix remains ".BAK" and
that it can be overridden properly.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I assume this matches some existing convention (re: name of the environment variable)?

This revision is now accepted and ready to land.May 26 2017, 4:11 PM

Indeed, the name of the env variable follows convention established by GNU indent(1) and, perhaps more importantly, our patch(1) also uses it if specified unless overridden by a flag.

pstef added a subscriber: pstef.
pstef added inline comments.
usr.bin/indent/indent.c
104 ↗(On Diff #28829)

I'd suggest const char *envval = NULL;

kevans edited edge metadata.
  • Const'ify envval based on suggestion by pstef@
This revision now requires review to proceed.May 26 2017, 6:52 PM
This revision is now accepted and ready to land.May 26 2017, 6:59 PM
This revision was automatically updated to reflect the committed changes.