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)
Fri, Dec 6, 9:16 AM
Unknown Object (File)
Fri, Nov 29, 1:12 AM
Unknown Object (File)
Tue, Nov 26, 5:53 PM
Unknown Object (File)
Sun, Nov 24, 9:34 PM
Unknown Object (File)
Nov 5 2024, 4:02 AM
Unknown Object (File)
Sep 27 2024, 1:30 PM
Unknown Object (File)
Sep 27 2024, 1:30 PM
Unknown Object (File)
Sep 27 2024, 1:30 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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 9497
Build 9946: arc lint + arc unit

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

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.