## Neue Features - **--max-depth N**: Begrenzt Rekursionstiefe auf N Ebenen (erfordert -r) - Nützlich für sehr tiefe Verzeichnisbäume (z.B. node_modules) - Verhindert unnötige Traversierung tiefer Strukturen - **Explizites Symlink-Handling**: - Standard: Symlinks werden komplett übersprungen (sicher) - Mit --special: Nur Symlink-Namen werden bereinigt, Ziel bleibt unangetastet - follow_links(false) explizit gesetzt zur Vermeidung von Endlosschleifen - Verhindert unbeabsichtigte Änderungen außerhalb des Zielverzeichnisses - **Verbose Symlink-Logging**: Zeigt mit -v welche Symlinks übersprungen werden ## Tests - 5 neue Integration-Tests hinzugefügt: - test_max_depth_option - test_max_depth_requires_recursive - test_symlinks_default_behavior (Unix only) - test_symlinks_with_special_flag (Unix only) - test_symlinks_not_followed (Unix only) - Alle 30 Tests bestehen (25 bestehende + 5 neue) ## Dokumentation - README.md: Neue Beispiele und "Symlink Behavior" Sektion - CHANGELOG.md: v1.2.0 Eintrag mit allen Änderungen - man/ntu.1: --max-depth Option und SYMLINK BEHAVIOR Sektion - CLAUDE.md: Aktualisierte Code-Architektur Dokumentation Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
5.6 KiB
5.6 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[1.2.0] - 2025-02-12
Added
--max-depth Noption: Limit recursion depth to N levels (requires-r/--recursive)- Explicit symlink handling: Symlinks are no longer followed (
follow_links(false))- Default: Symlinks are completely skipped (not renamed, not followed)
- With
--special: Only the symlink name is sanitized, target remains unchanged - Prevents infinite loops from circular symlinks
- Prevents unintended changes outside target directory
- Verbose symlink logging: Shows which symlinks are skipped when using
-v
Changed
WalkDirnow explicitly usesfollow_links(false)for safety- Improved verbose logging to indicate when max-depth is active
Technical
- Added 5 new integration tests for max-depth and symlink behavior
- All tests passing (30 total: 25 existing + 5 new)
- Unix-specific symlink tests use
#[cfg(unix)]attribute
[1.1.0] - 2025-02-10
Added
-s/--sequence <name>option: Select transformation sequence (default, lower, upper, minimal, utf-8)-Loption: List all available sequences (use with-vfor details)- 5 hardcoded sequences:
default: Current behavior (umlauts→ASCII, spaces→underscores)lower: Like default + convert to lowercaseupper: Like default + convert to UPPERCASEminimal: Only replace spaces, keep UTF-8 charactersutf-8: UTF-8 friendly (keep umlauts, remove special chars)
Changed
- Refactored
clean_filename()to support sequence-based transformations - Umlaut replacements moved from hardcoded to sequence-specific logic
- Case transformations now also apply to file extensions
Technical
- Added
Sequencestruct andCaseTransformenum insanitizer.rs - Extended CLI with
-sand-Loptions - Added
list_sequences()function inmain.rs - Updated all unit tests to pass
Sequenceparameter - Added 8 new integration tests for sequence functionality
[1.0.0] - 2025-02-10
⚠️ BREAKING CHANGES
- Recursion is now opt-in: By default,
ntuonly processes the specified paths and their immediate children. Use-r/--recursiveflag to enable recursive directory traversal. - Migration: Add
-rto existing commands to preserve v0.x behavior
Added
--conf <FILE>option: Specify a single configuration file, bypassing the default hierarchy (/etc → ~/.config → ./). Errors if file doesn't exist.-r/--recursiveflag: Enable recursive directory processing
Changed
- Default behavior is now non-recursive (use
-rfor recursive processing) - All integration tests updated to explicitly use
-rflag
Migration Guide
# Old command (v0.x - always recursive):
ntu /path/to/files
# New equivalent (v1.x - explicit recursion):
ntu -r /path/to/files
[0.3.0] - 2025-02-10
Added
- CI/CD Pipeline: Automated testing and release builds via GitHub Actions
- CI workflow: Tests on Rust stable and beta, Clippy, rustfmt checks
- Release workflow: Multi-platform builds (Linux x86_64, Linux musl, macOS Intel, macOS ARM)
- Shell Completions: Auto-completion support for all major shells
- Bash completion (
completions/ntu.bash) - Zsh completion (
completions/_ntu) - Fish completion (
completions/ntu.fish)
- Bash completion (
- Manpage: Professional manual page (
man/ntu.1) with full documentation - Colored Output: Terminal colors for better visual feedback
- Green for successful renames
- Yellow for dry-run mode
- Red for errors
- Cyan/bold for statistics
--no-colorflag to disable colors
- Integration Tests: 13 comprehensive integration tests using
assert_cmd - README: Installation instructions for pre-built binaries, badges (CI, Release, Version, License)
Changed
- Improved
.gitignorewith better organization - Better error messages with colored output
- Updated test framework to use modern
cargo_bin!macro
Fixed
- Removed unused
warnimport
[0.2.0] - 2025-02-10
Added
- CLI:
--dry-runas primary option (with--no-changesas deprecated alias for backward compatibility) - CLI:
--specialflag to process symlinks and special files (normally skipped) - Smart Default Excludes: Automatically ignore
.git,.svn,node_modules,.cache,__pycache__ - Double Extensions: Proper handling of
.tar.gz,.tar.bz2,.tar.xz,.tar.zst,.tar.lz,.tar.Z - Parallel Processing: Using
rayonfor parallel filename cleaning when processing ≥100 files - Write Permission Checks: Check write permissions before attempting rename operations
- Unit Tests: 9 comprehensive tests for
clean_filename()covering edge cases
Fixed
- Critical Bug: Hidden files (like
.gitignore) are no longer incorrectly renamed tounnamed.xxx - Leading dot in hidden files is now correctly preserved
- Fixed all clippy warnings
Changed
- Binary renamed from
NameToUnixtontu(shorter CLI usage) - Improved error messages for permission issues
- Better handling of hidden files with spaces (
.my config→.my_config)
Performance
- Parallel processing with rayon for large directory trees (threshold: 100 files)
- Optimized regex patterns using
once_cell::Lazy
[0.1.0] - 2025-03-07
Added
- Initial release
- Basic filename sanitization
- Configurable replacements via TOML
- Recursive directory processing
- Exclude patterns support
- German umlaut conversion
- Special identifier preservation (C++, C#)