Skip to content

Commit

Permalink
Add completion for fishshell
Browse files Browse the repository at this point in the history
Other completions may be added later by other contributors.
  • Loading branch information
ccoVeille committed Mar 25, 2024
1 parent 13bba25 commit 953ae4d
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
5 changes: 5 additions & 0 deletions completions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Shell completion scripts

Please refer to each folder about how to install completion for `rmw` to your shell

Feel free to contribute by opening PR providing completions to shells you like.
10 changes: 10 additions & 0 deletions completions/fish/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Fish Shell completion scripts

Please find here how to install `rmw` completion for [fish](https://fishshell.com/)

# Installation instructions

```shell
mkdir -p ~/.config/fish/completions/ # create fish completion folder if missing
cp rmw.fish ~/.config/fish/completions/rmw.fish
```
30 changes: 30 additions & 0 deletions completions/fish/rmw.fish
Original file line number Diff line number Diff line change
@@ -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 'display help' -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 'Explain what is done' -f
complete rmw -l version -d 'Display rmw version' -f
complete rmw -l warranty -d 'display warranty' -f

complete rmw -s z -l restore -d 'restore FILE(s)'
complete rmw -s s -l select -d 'interactively select files from list to restore' -f
complete rmw -s u -l undo-last -d 'undo last deletion' -f
complete rmw -s m -l most-recent-list -d 'list files most recently deleted with rmw' -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)'

0 comments on commit 953ae4d

Please sign in to comment.