Skip to content

Release v0.1.5

🔧 Simplified Config Edit Flow

The config edit command has been refactored for a cleaner, safer editing experience.

What Changed

Before (v0.1.4):

  1. Create backup file (config.toml.bak)
  2. Open editor directly on config file
  3. Validate after save
  4. If failed: restore from backup

After (v0.1.5):

  1. Read config into memory
  2. Edit in temporary file (via edit crate)
  3. Validate in memory
  4. Only write to config file if validation passes

Benefits

  • Safer: Original file is never modified until validation passes
  • Consistent: Uses same edit crate as commit message editing
  • Better UX: Re-edit preserves your changes (no more losing edits on validation failure)
  • Cleaner: No backup files left behind

The validation failure menu now shows:

? What would you like to do?
> ✎ Re-edit the config file
  ↩ Keep original config        ← was "Restore previous config"
  ⚠ Ignore errors and save anyway (dangerous)

"Keep original" better reflects reality: the original file was never changed.

📦 Installation

bash
cargo install gcop-rs

Or build from source:

bash
git clone https://github.com/AptS-1547/gcop-rs.git
cd gcop-rs
cargo build --release

📚 Documentation