From e872cefe54a4e7e8e8d00fd4c9144c17409ce7a9 Mon Sep 17 00:00:00 2001 From: dschlueter Date: Tue, 10 Feb 2026 13:41:17 +0100 Subject: [PATCH] =?UTF-8?q?F=C3=BCge=20Fish=20Shell=20Completion=20hinzu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Vollständige Completion für Fish Shell (completions/ntu.fish) - Unterstützt alle Flags und Optionen - Path-Completion für Verzeichnisse und Dateien - README um Fish-Installation erweitert Co-Authored-By: Claude Sonnet 4.5 --- README.md | 4 +++- completions/ntu.fish | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 completions/ntu.fish diff --git a/README.md b/README.md index c2c3cc7..c1ce457 100644 --- a/README.md +++ b/README.md @@ -88,10 +88,12 @@ sudo cp .NameToUnix.conf /etc/NameToUnix/config.toml # Copy config file to mkdir -p ~/.config/NameToUnix/ # Create a personal config directory for NameToUnix cp .NameToUnix.conf ~/.config/NameToUnix/config.toml # Copy config file to this personal directory -# Bash-Completion (optional) +# Shell-Completion (optional) sudo cp completions/ntu.bash /etc/bash_completion.d/ntu # Bash completion # Oder für Zsh: sudo cp completions/_ntu /usr/share/zsh/site-functions/_ntu # Zsh completion +# Oder für Fish: +sudo cp completions/ntu.fish /usr/share/fish/vendor_completions.d/ntu.fish # Fish completion # Manpage (optional) sudo cp man/ntu.1 /usr/share/man/man1/ # Install manual page diff --git a/completions/ntu.fish b/completions/ntu.fish new file mode 100644 index 0000000..f1c898f --- /dev/null +++ b/completions/ntu.fish @@ -0,0 +1,20 @@ +# Fish completion for ntu (NameToUnix) + +# Main command +complete -c ntu -f -d 'Sanitize file and directory names to Unix conventions' + +# Options +complete -c ntu -s q -l quiet -d 'Suppress output (no rename information)' +complete -c ntu -s n -l dry-run -d 'Show what would be renamed without making changes' +complete -c ntu -l no-changes -d 'Alias for --dry-run' +complete -c ntu -s f -l force -d 'Overwrite existing files' +complete -c ntu -s e -l exclude -d 'Exclude files matching pattern' -r +complete -c ntu -s v -l verbose -d 'Show verbose debug information' +complete -c ntu -l modify-root -d 'Allow renaming the root directory' +complete -c ntu -l special -d 'Process symbolic links and special files' +complete -c ntu -l no-color -d 'Disable colored output' +complete -c ntu -s h -l help -d 'Print help information' +complete -c ntu -s V -l version -d 'Print version information' + +# File/directory completion for paths +complete -c ntu -a '(__fish_complete_path)' -d 'Path to process'