diff --git a/CHANGELOG.md b/CHANGELOG.md index 3291d0f..76d49f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased +### Added +- Output now contains a reminder to use `fif --fix` ### Changed - Some extensions are considered to be always valid - these are: - "filepart", "part", "crdownload": Partially downloaded files, renaming could break download diff --git a/src/formats.rs b/src/formats.rs index bd640d6..e6d6135 100644 --- a/src/formats.rs +++ b/src/formats.rs @@ -197,6 +197,7 @@ impl FormatSteps for Shell { if let Ok(working_directory) = std::env::current_dir() { smart_write(f, writablesln!["# Run from ", (working_directory.as_path())])?; } + write!(f, "# Happy with these changes? Run `fif --fix` from the same directory!")?; smart_write(f, writablesln![Newline, "set -e", Newline]) } @@ -253,6 +254,7 @@ impl FormatSteps for PowerShell { if let Ok(working_directory) = std::env::current_dir() { smart_write(f, writablesln!["<# Run from ", (working_directory.as_path()), " #>"])?; } + write!(f, "<# Happy with these changes? Run `fif --fix` from the same directory! #>")?; smart_write(f, writables![Newline]) } @@ -287,7 +289,11 @@ impl FormatSteps for Text { } fn header(&self, f: &mut W) -> io::Result<()> { - smart_write(f, writablesln![(generated_by().as_str()), Newline]) + smart_write(f, writablesln![(generated_by().as_str()), Newline])?; + if let Ok(working_directory) = std::env::current_dir() { + smart_write(f, writablesln!["Run from ", (working_directory.as_path())])?; + } + write!(f, "Happy with these changes? Run `fif --fix` from the same directory!") } fn footer(&self, f: &mut W) -> io::Result<()> {