-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathtar.sh
40 lines (36 loc) · 1.13 KB
/
tar.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
_patch_help() {
$@ --help | \
sed \
-e '/Mandatory or optional/,$ d' \
-e 's/--verbatim-files-from -T/--verbatim-files-from The -T/' \
}
_patch_table() {
_patch_table_add_metadata 'combine-shorts' | \
_patch_table_edit_options \
'--atime-preserve;[replace|system]' \
'--backup;[existing|never|nil|numbered|simple|t]' \
'--file(<FILE>)' \
'--format;[gnu|oldgnu|pax|posix|ustar|v7]' \
'--group;[`_module_os_group`]' \
'--owner;[`_module_os_user`]' \
'--quoting-style;[c|clocale|c-maybe|escape|literal|locale|shell|shell-always]' \
| \
_patch_table_edit_arguments ';;' 'FILES;*[`_choice_files`]'
}
_choice_files() {
if [[ -n $argc_delete ]] \
|| [[ -n $argc_list ]] \
|| [[ -n $argc_x ]] \
|| [[ -n $argc_extract ]] \
|| [[ -n $argc_get ]] \
; then
if [[ -n "$argc_file" ]]; then
_argc_util_cache 3600 _choice_ls_tar_file "tar__choice_ls_tar_file:$argc_file" | _argc_util_comp_parts /
return
fi
fi
_argc_util_comp_path
}
_choice_ls_tar_file() {
tar --list --file "$argc_file"
}