Skip to content

Commit

Permalink
update completions
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoisaiah committed Nov 2, 2024
1 parent 78574e0 commit 81b0afe
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
9 changes: 9 additions & 0 deletions scripts/completions/f2.bash
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ f2_opts="
--replace
--undo
--allow-overwrites
--clean
--exclude
--exclude-dir
--exec
--fix-conflicts
--fix-conflicts-pattern
--help
--hidden
--include-dir
Expand All @@ -17,12 +20,18 @@ f2_opts="
--max-depth
--no-color
--only-dir
--pair
--pair-order
--quiet
--recursive
--replace-limit
--reset-index-per-dir
--sort
--sortr
--sort-per-dir
--sort-var
--string-mode
--target-dir
--verbose
--version
"
Expand Down
28 changes: 26 additions & 2 deletions scripts/completions/f2.fish
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,21 @@ complete --command f2 --long-option undo --short-option u --description "Undo th

complete --command f2 --long-option allow-overwrites --description "Allow overwriting existing files" --no-files

complete --command f2 --long-option clean --short-option c --description "Clean
empty directories after renaming" --no-files

complete --command f2 --long-option exclude --short-option E --description "Exclude files and directories matching pattern" --no-files

complete --command f2 --long-option exclude-dir --description "Prevent recursing into directories to search for matches" --no-files

complete --command f2 --long-option exiftool-opts --description "Customize Exiftool behavior" --no-files

complete --command f2 --long-option exec --short-option x --description "Execute renaming operation" --no-files

complete --command f2 --long-option fix-conflicts --short-option F --description "Auto fix renaming conflicts" --no-files

complete --command f2 --long-option fix-conflicts-pattern --description "Provide a custom pattern for conflict resolution" --no-files

complete --command f2 --long-option help --short-option h --description "Display help and exit" --no-files

complete --command f2 --long-option hidden --short-option H --description "Match hidden files" --no-files
Expand All @@ -32,28 +41,43 @@ complete --command f2 --long-option no-color --description "Disable coloured out

complete --command f2 --long-option only-dir --short-option D --description "Rename only directories" --no-files

complete --command f2 --long-option pair --short-option p --description "Enable pair renaming" --no-files

complete --command f2 --long-option pair-order --description "Order the paired files" --no-files

complete --command f2 --long-option quiet --short-option q --description "Disable all output except errors" --no-files

complete --command f2 --long-option recursive --short-option R --description "Search for matches in subdirectories" --no-files

complete --command f2 --long-option replace-limit --short-option l --description "Limit the matches to be replaced" --no-files

complete --command f2 --long-option reset-index-per-dir --description "Reset indexes in each directory" --no-files

set -l sort_args "
default\t'Alphabetical order'
default\t'Lexicographical order'
size\t'Sort by file size'
natural\t'Sort according to natural order'
mtime\t'Sort by file last modified time'
btime\t'Sort by file creation time'
atime\t'Sort by file last access time'
ctime\t'Sort by file metadata last change time'
time_var\t'Sort by time variable'
int_var\t'Sort by integer variable'
string_var\t'Sort by string variable'
"

complete --command f2 --long-option sort --description "Sort matches in ascending order" --exclusive --keep-order --arguments $sort_args

complete --command f2 --long-option sortr --description "Sort matches in descending order" --exclusive --keep-order --arguments $sort_args

complete --command f2 --long-option sort-per-dir --description "Apply sort per directory" --no-files

complete --command f2 --long-option sort-var --description "Provide a variable for sorting" --no-files

complete --command f2 --long-option string-mode --short-option s --description "Treat the search pattern as a non-regex string" --no-files

complete --command f2 --long-option target-dir --short-option t --description "Specify a target directory"

complete --command f2 --long-option verbose --short-option V --description "Enable verbose output" --no-files

complete --command f2 --long-option version --short-option v --description "Display version and exit" --no-files

11 changes: 11 additions & 0 deletions scripts/completions/f2.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ function _f2 {
"--undo[Undo the last renaming operation in current directory]" \
"-u[Undo the last renaming operation in current directory]" \
"--allow-overwrites[Allow overwriting existing files]" \
"--clean[Clean empty directories after renaming]" \
"--exclude[Exclude files and directories matching pattern]" \
"-E[Exclude files and directories matching pattern]" \
"--exclude-dir[Prevent recursing into directories to search for matches]" \
"--exec[Execute renaming operation]" \
"-x[Execute renaming operation]" \
"--fix-conflicts[Auto fix renaming conflicts]" \
"-F[Auto fix renaming conflicts]" \
"--fix-conflicts-patern[Provide a custom pattern for conflict resolution]" \
"--help[Display help and exit]" \
"-h[Display help and exit]" \
"--hidden[Match hidden files]" \
Expand All @@ -34,16 +37,24 @@ function _f2 {
"--no-color[Disable coloured output]" \
"--only-dir[Rename only directories]" \
"-D[Rename only directories]" \
"--pair[Enable pair renaming]" \
"-p[Enable pair renaming]" \
"--pair-order[Order the paired files]" \
"--quiet[Disable all output except errors]" \
"-q[Disable all output except errors]" \
"--recursive[Search for matches in subdirectories]" \
"-R[Search for matches in subdirectories]" \
"--replace-limit[Limit the matches to be replaced]" \
"-R[Limit the matches to be replaced]" \
"--reset-index-per-dir[Reset indexes in each directory]" \
"--sort[Sort matches in ascending order]" \
"--sortr[Sort matches in descending order]" \
"--sort-per-dir[Apply sort per directory]" \
"--sort-var[Provide a variable for sorting]" \
"--string-mode[Treat the search pattern as a non-regex string]" \
"-s[Treat the search pattern as a non-regex string]" \
"--target-dir[Specify a target directory]" \
"-t[Specify a target directory]" \
"--verbose[Enable verbose output]" \
"-V[Enable verbose output]" \
"--version[Display version and exit]" \
Expand Down

0 comments on commit 81b0afe

Please sign in to comment.