aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--share/completions/acat.fish3
-rw-r--r--share/completions/adiff.fish2
-rw-r--r--share/completions/als.fish3
-rw-r--r--share/completions/apack.fish2
-rw-r--r--share/completions/arepack.fish2
-rw-r--r--share/completions/atool.fish28
-rw-r--r--share/completions/aunpack.fish3
-rw-r--r--share/functions/__fish_complete_atool.fish37
8 files changed, 36 insertions, 44 deletions
diff --git a/share/completions/acat.fish b/share/completions/acat.fish
index 444e915e..991266d1 100644
--- a/share/completions/acat.fish
+++ b/share/completions/acat.fish
@@ -1 +1,2 @@
-__fish_complete_atool acat
+complete -c acat -w atool
+complete -c acat -a '(__fish_complete_atool_archive_contents)' -d 'Archive content'
diff --git a/share/completions/adiff.fish b/share/completions/adiff.fish
index f64167d8..cfd24e32 100644
--- a/share/completions/adiff.fish
+++ b/share/completions/adiff.fish
@@ -1 +1 @@
-__fish_complete_atool adiff
+complete -c adiff -w atool
diff --git a/share/completions/als.fish b/share/completions/als.fish
index 5c494a20..3a0f9155 100644
--- a/share/completions/als.fish
+++ b/share/completions/als.fish
@@ -1 +1,2 @@
-__fish_complete_atool als
+complete -c als -w atool
+complete -c als -a '(__fish_complete_atool_archive_contents)' -d 'Archive content'
diff --git a/share/completions/apack.fish b/share/completions/apack.fish
index a3aff7e3..0e956874 100644
--- a/share/completions/apack.fish
+++ b/share/completions/apack.fish
@@ -1 +1 @@
-__fish_complete_atool apack
+complete -c apack -w atool
diff --git a/share/completions/arepack.fish b/share/completions/arepack.fish
index 08c84799..f0917bf7 100644
--- a/share/completions/arepack.fish
+++ b/share/completions/arepack.fish
@@ -1 +1 @@
-__fish_complete_atool arepack
+complete -c arepack -w atool
diff --git a/share/completions/atool.fish b/share/completions/atool.fish
index 09480e54..eb85fa63 100644
--- a/share/completions/atool.fish
+++ b/share/completions/atool.fish
@@ -1,3 +1,29 @@
+complete -c atool -r -d 'Manage file archives of various types'
-__fish_complete_atool atool
+##Commands:
+complete -c atool -s l -l list -d 'list files in archive (als)'
+complete -c atool -s x -l extract -d 'extract files from archive (aunpack)'
+complete -c atool -s X -l extract-to -r -d 'extract archive to specified directory'
+complete -c atool -s a -l add -d 'create archive (apack)'
+complete -c atool -s c -l cat -d 'extract file to standard out (acat)'
+complete -c atool -s d -l diff -d 'generate a diff between two archives (adiff)'
+complete -c atool -s r -l repack -d 'repack archives to a different format (arepack)'
+complete -c atool -l help -d 'display this help and exit'
+complete -c atool -l version -d 'output version information and exit'
+##Options:
+complete -c atool -s e -l each -d 'execute command above for each file specified'
+complete -c atool -s F -l format -d 'override archive format (see below)' -xa "(man atool | sgrep -E '^\s+(\S+)\s+\(\..+\)' | sed -r 's/\s+(\S+)\s+\((.+)\)/\1\t\2/')"
+complete -c atool -s O -l format-option -x -d 'give specific options to the archiver'
+complete -c atool -s D -l subdir -d 'always create subdirectory when extracting'
+complete -c atool -s f -l force -d 'allow overwriting of local files'
+complete -c atool -s q -l quiet -d 'decrease verbosity level by one'
+complete -c atool -s v -l verbose -d 'increase verbosity level by one'
+complete -c atool -s V -l verbosity -d 'specify verbosity (0, 1 or 2)' -xa '(seq 0 2)'
+complete -c atool -s p -l page -d 'send output through pager'
+complete -c atool -s 0 -l null -d 'filenames from standard in are null-byte separated'
+complete -c atool -s E -l explain -d 'explain what is being done by atool'
+complete -c atool -s S -l simulate -d 'simulation mode - no filesystem changes are made'
+complete -c atool -s o -l option -x -d 'override a configuration option (KEY=VALUE)'
+complete -c atool -l config -r -d 'load configuration defaults from file'
+#man -P cat atool | grep '(default')'
diff --git a/share/completions/aunpack.fish b/share/completions/aunpack.fish
index 6234a4c9..4bdc7479 100644
--- a/share/completions/aunpack.fish
+++ b/share/completions/aunpack.fish
@@ -1 +1,2 @@
-__fish_complete_atool aunpack
+complete -c aunpack -w atool
+complete -c aunpack -a '(__fish_complete_atool_archive_contents)' -d 'Archive content'
diff --git a/share/functions/__fish_complete_atool.fish b/share/functions/__fish_complete_atool.fish
deleted file mode 100644
index f9b0a746..00000000
--- a/share/functions/__fish_complete_atool.fish
+++ /dev/null
@@ -1,37 +0,0 @@
-function __fish_complete_atool --description 'Complete atool' --argument-names cmd
- complete -c $cmd -r -d 'Manage file archives of various types'
-
- ##Commands:
- complete -c $cmd -s l -l list -d 'list files in archive (als)'
- complete -c $cmd -s x -l extract -d 'extract files from archive (aunpack)'
- complete -c $cmd -s X -l extract-to -r -d 'extract archive to specified directory'
- complete -c $cmd -s a -l add -d 'create archive (apack)'
- complete -c $cmd -s c -l cat -d 'extract file to standard out (acat)'
- complete -c $cmd -s d -l diff -d 'generate a diff between two archives (adiff)'
- complete -c $cmd -s r -l repack -d 'repack archives to a different format (arepack)'
- complete -c $cmd -l help -d 'display this help and exit'
- complete -c $cmd -l version -d 'output version information and exit'
-
- ##Options:
- complete -c $cmd -s e -l each -d 'execute command above for each file specified'
- complete -c $cmd -s F -l format -d 'override archive format (see below)' -xa "(man atool | sgrep -E '^\s+(\S+)\s+\(\..+\)' | sed -r 's/\s+(\S+)\s+\((.+)\)/\1\t\2/')"
- complete -c $cmd -s O -l format-option -x -d 'give specific options to the archiver'
- complete -c $cmd -s D -l subdir -d 'always create subdirectory when extracting'
- complete -c $cmd -s f -l force -d 'allow overwriting of local files'
- complete -c $cmd -s q -l quiet -d 'decrease verbosity level by one'
- complete -c $cmd -s v -l verbose -d 'increase verbosity level by one'
- complete -c $cmd -s V -l verbosity -d 'specify verbosity (0, 1 or 2)' -xa '(seq 0 2)'
- complete -c $cmd -s p -l page -d 'send output through pager'
- complete -c $cmd -s 0 -l null -d 'filenames from standard in are null-byte separated'
- complete -c $cmd -s E -l explain -d 'explain what is being done by atool'
- complete -c $cmd -s S -l simulate -d 'simulation mode - no filesystem changes are made'
- complete -c $cmd -s o -l option -x -d 'override a configuration option (KEY=VALUE)'
- complete -c $cmd -l config -r -d 'load configuration defaults from file'
-
- switch $cmd
- case als aunpack acat
- complete -c $cmd -a '(__fish_complete_atool_archive_contents)' -d 'Archive content'
- end
- #man -P cat atool | grep '(default')'
-
-end