Skip to content

Commit 2d1f793

Browse files
authored
Merge pull request #456 from JindrichPilar/trash-cli
Autocompletion for trash-cli
2 parents 04f4722 + d7b0bc8 commit 2d1f793

File tree

4 files changed

+240
-0
lines changed

4 files changed

+240
-0
lines changed

Diff for: src/_trash-empty

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#compdef trash-empty
2+
# ------------------------------------------------------------------------------
3+
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users
4+
# All rights reserved.
5+
#
6+
# Redistribution and use in source and binary forms, with or without
7+
# modification, are permitted provided that the following conditions are met:
8+
# * Redistributions of source code must retain the above copyright
9+
# notice, this list of conditions and the following disclaimer.
10+
# * Redistributions in binary form must reproduce the above copyright
11+
# notice, this list of conditions and the following disclaimer in the
12+
# documentation and/or other materials provided with the distribution.
13+
# * Neither the name of the zsh-users nor the
14+
# names of its contributors may be used to endorse or promote products
15+
# derived from this software without specific prior written permission.
16+
#
17+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
21+
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24+
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
# ------------------------------------------------------------------------------
28+
# Description
29+
# -----------
30+
#
31+
# Completion script for trash-empty a tool from trash management package trash-cli (http://code.google.com/p/trash-cli).
32+
#
33+
# ------------------------------------------------------------------------------
34+
# Authors
35+
# -------
36+
#
37+
# * Jindřich Pilař (https://github.com/JindrichPilar)
38+
#
39+
# ------------------------------------------------------------------------------
40+
41+
42+
_trash-empty() {
43+
44+
_arguments -C \
45+
'--version[Show programs version number and exit]' \
46+
{-h,--help}'[Show help message and exit]' \
47+
'*: :' \
48+
49+
}
50+
51+
_trash-empty
52+
53+
# Local Variables:
54+
# mode: Shell-Script
55+
# sh-indentation: 2
56+
# indent-tabs-mode: nil
57+
# sh-basic-offset: 2
58+
# End:
59+
# vim: ft=zsh sw=2 ts=2 et

Diff for: src/_trash-list

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#compdef trash-list
2+
# ------------------------------------------------------------------------------
3+
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users
4+
# All rights reserved.
5+
#
6+
# Redistribution and use in source and binary forms, with or without
7+
# modification, are permitted provided that the following conditions are met:
8+
# * Redistributions of source code must retain the above copyright
9+
# notice, this list of conditions and the following disclaimer.
10+
# * Redistributions in binary form must reproduce the above copyright
11+
# notice, this list of conditions and the following disclaimer in the
12+
# documentation and/or other materials provided with the distribution.
13+
# * Neither the name of the zsh-users nor the
14+
# names of its contributors may be used to endorse or promote products
15+
# derived from this software without specific prior written permission.
16+
#
17+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
21+
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24+
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
# ------------------------------------------------------------------------------
28+
# Description
29+
# -----------
30+
#
31+
# Completion script for trash-list a tool from trash management package trash-cli (http://code.google.com/p/trash-cli).
32+
#
33+
# ------------------------------------------------------------------------------
34+
# Authors
35+
# -------
36+
#
37+
# * Jindřich Pilař (https://github.com/JindrichPilar)
38+
#
39+
# ------------------------------------------------------------------------------
40+
41+
42+
_trash-list() {
43+
44+
_arguments -C \
45+
'--version[Show programs version number and exit]' \
46+
{-h,--help}'[Show help message and exit]' \
47+
'*: :' \
48+
49+
}
50+
51+
_trash-list
52+
53+
# Local Variables:
54+
# mode: Shell-Script
55+
# sh-indentation: 2
56+
# indent-tabs-mode: nil
57+
# sh-basic-offset: 2
58+
# End:
59+
# vim: ft=zsh sw=2 ts=2 et

Diff for: src/_trash-put

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#compdef trash-put trash
2+
# ------------------------------------------------------------------------------
3+
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users
4+
# All rights reserved.
5+
#
6+
# Redistribution and use in source and binary forms, with or without
7+
# modification, are permitted provided that the following conditions are met:
8+
# * Redistributions of source code must retain the above copyright
9+
# notice, this list of conditions and the following disclaimer.
10+
# * Redistributions in binary form must reproduce the above copyright
11+
# notice, this list of conditions and the following disclaimer in the
12+
# documentation and/or other materials provided with the distribution.
13+
# * Neither the name of the zsh-users nor the
14+
# names of its contributors may be used to endorse or promote products
15+
# derived from this software without specific prior written permission.
16+
#
17+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
21+
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24+
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
# ------------------------------------------------------------------------------
28+
# Description
29+
# -----------
30+
#
31+
# Completion script for trash-put a tool from trash management package trash-cli (http://code.google.com/p/trash-cli).
32+
#
33+
# ------------------------------------------------------------------------------
34+
# Authors
35+
# -------
36+
#
37+
# * Jindřich Pilař (https://github.com/JindrichPilar)
38+
#
39+
# ------------------------------------------------------------------------------
40+
41+
42+
_trash-put() {
43+
44+
_arguments -C \
45+
'--version[Show programs version number and exit]' \
46+
{-h,--help}'[Show help message and exit]' \
47+
{-d,--directory}'[Remove empty directories - ignored (for GNU rm compabilty)]' \
48+
{-f,--force}'[Ignore nonexistent arguments and never prompt - ignored (for GNU rm compabilty)]' \
49+
{-i,--interactive}'[Prompt before every removal - ignored (for GNU rm compabilty)]' \
50+
{-r,-R,--recursive}'[Remove directories and their content recursively - ignored (for GNU rm compabilty)]' \
51+
{-v,--verbose}'[Explain what is being done]' \
52+
'*: :_files' \
53+
54+
}
55+
56+
_trash-put
57+
58+
# Local Variables:
59+
# mode: Shell-Script
60+
# sh-indentation: 2
61+
# indent-tabs-mode: nil
62+
# sh-basic-offset: 2
63+
# End:
64+
# vim: ft=zsh sw=2 ts=2 et

Diff for: src/_trash-restore

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#compdef trash-restore
2+
# ------------------------------------------------------------------------------
3+
# Copyright (c) 2016 Github zsh-users - http://github.com/zsh-users
4+
# All rights reserved.
5+
#
6+
# Redistribution and use in source and binary forms, with or without
7+
# modification, are permitted provided that the following conditions are met:
8+
# * Redistributions of source code must retain the above copyright
9+
# notice, this list of conditions and the following disclaimer.
10+
# * Redistributions in binary form must reproduce the above copyright
11+
# notice, this list of conditions and the following disclaimer in the
12+
# documentation and/or other materials provided with the distribution.
13+
# * Neither the name of the zsh-users nor the
14+
# names of its contributors may be used to endorse or promote products
15+
# derived from this software without specific prior written permission.
16+
#
17+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
# DISCLAIMED. IN NO EVENT SHALL ZSH-USERS BE LIABLE FOR ANY
21+
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24+
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
# ------------------------------------------------------------------------------
28+
# Description
29+
# -----------
30+
#
31+
# Completion script for trash-restore a tool from trash management package trash-cli (http://code.google.com/p/trash-cli).
32+
#
33+
# ------------------------------------------------------------------------------
34+
# Authors
35+
# -------
36+
#
37+
# * Jindřich Pilař (https://github.com/JindrichPilar)
38+
#
39+
# ------------------------------------------------------------------------------
40+
41+
42+
_trash-restore() {
43+
44+
_arguments -C \
45+
'--version[Show programs version number and exit]' \
46+
'*: :' \
47+
48+
}
49+
50+
_trash-restore
51+
52+
# Local Variables:
53+
# mode: Shell-Script
54+
# sh-indentation: 2
55+
# indent-tabs-mode: nil
56+
# sh-basic-offset: 2
57+
# End:
58+
# vim: ft=zsh sw=2 ts=2 et

0 commit comments

Comments
 (0)