From 92dfe3a1c2b49ffbb04fe23930cbdfe960f6c5b9 Mon Sep 17 00:00:00 2001 From: ccoVeille <3875889+ccoVeille@users.noreply.github.com> Date: Mon, 25 Mar 2024 09:40:51 +0100 Subject: [PATCH] Add completion for fishshell Other completions may be added later by other contributors. Fixes #436 --- completions/README.md | 3 +++ completions/fish/README.md | 4 ++++ completions/fish/rmw.fish | 30 ++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 completions/README.md create mode 100644 completions/fish/README.md create mode 100644 completions/fish/rmw.fish diff --git a/completions/README.md b/completions/README.md new file mode 100644 index 00000000..0e03ce61 --- /dev/null +++ b/completions/README.md @@ -0,0 +1,3 @@ +# Shell completion scripts + +Please refer to each folder about how to install completion for `rmw` to your shell diff --git a/completions/fish/README.md b/completions/fish/README.md new file mode 100644 index 00000000..acb85ac5 --- /dev/null +++ b/completions/fish/README.md @@ -0,0 +1,4 @@ +# Fish Shell completion scripts + +Please find here how to install `rmw` completion for [fish](https://fishshell.com/) + diff --git a/completions/fish/rmw.fish b/completions/fish/rmw.fish new file mode 100644 index 00000000..0d63cf6c --- /dev/null +++ b/completions/fish/rmw.fish @@ -0,0 +1,30 @@ +# This file contains the fish completion for rmw +# +# rmw is a trashcan/recycle bin utility for the command line +# +# More information about this tool on https://github.com/theimpossibleastronaut/rmw +# +# This file is intended to be released with rmw with various packaging managers + +complete rmw -s h -l help -d 'show help for command line options' -f +complete rmw -s c -l config -d 'use an alternate configuration' -r +complete rmw -s l -l list -d 'list waste directories' -f +complete rmw -s g -l purge -d 'purge expired files' +complete rmw -s o -l orphaned -d 'check for orphaned files (maintenance)' -f +complete rmw -s f -l force -d 'allow purging of expired files' -f +complete rmw -l empty -d 'completely empty (purge) all waste directories' -f +complete rmw -l top-level-bypass -d 'bypass protection of top-level files' + +complete rmw -s v -l verbose -d 'increase output messages' -f +complete rmw -l warranty -d 'display warranty' -f +complete rmw -l version -d 'display version and license information' -f + +complete rmw -s z -l restore -d 'restore FILE(s) (see man page example)' +complete rmw -s s -l select -d 'select files from list to restore' -f +complete rmw -s u -l undo-last -d 'undo last move' -f +complete rmw -s m -l most-recent-list -d "list most recently rmw'ed files" -f + +# Options kept for compatibility purpose that do not need to be completed +# they are listed here to avoid people wondering why they are missing +# complete rmw -s R -s r -l recursive -d 'kept for compatibility purpose with rm (recursive operation is enabled by default)' +# complete rmw -s i -l interactive -d 'Prompt for removal (not implemented)'