2004-03-30 21:05:34 +00:00
|
|
|
# Mailman completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
|
2009-01-14 22:24:51 +02:00
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have list_lists && {
|
2004-03-30 21:05:34 +00:00
|
|
|
_mailman_lists()
|
|
|
|
{
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
COMPREPLY=( $( compgen -W '$( list_lists -b )' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
}
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
_list_lists()
|
|
|
|
{
|
|
|
|
local cur
|
|
|
|
|
|
|
|
COMPREPLY=()
|
|
|
|
cur=`_get_cword`
|
|
|
|
|
|
|
|
if [[ "$cur" == -* ]]; then
|
|
|
|
COMPREPLY=( $( compgen -W '-a --advertised \
|
|
|
|
--virtual-host-overview -V -b --bare \
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
-h --help' -- "$cur" ) )
|
2009-06-12 20:24:00 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
} &&
|
|
|
|
complete -F _list_lists list_lists
|
|
|
|
}
|
|
|
|
|
|
|
|
have add_members &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_add_members()
|
|
|
|
{
|
2009-06-12 20:26:54 +03:00
|
|
|
local cur prev split=false
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2004-03-30 21:05:34 +00:00
|
|
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
|
|
|
2009-06-12 20:26:54 +03:00
|
|
|
_split_longopt && split=true
|
|
|
|
|
2004-03-30 21:05:34 +00:00
|
|
|
case "$prev" in
|
2009-06-12 20:26:54 +03:00
|
|
|
-@(r|d|-regular-members-file|-digest-members-file))
|
2004-03-30 21:05:34 +00:00
|
|
|
_filedir
|
|
|
|
return 0
|
|
|
|
;;
|
2009-06-12 20:26:54 +03:00
|
|
|
-@(w|a|-welcome-msg|-admin-notify))
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
COMPREPLY=( $( compgen -W 'y n' -- "$cur") )
|
2004-03-30 21:05:34 +00:00
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2009-06-12 20:26:54 +03:00
|
|
|
$split && return 0
|
|
|
|
|
2004-03-30 21:05:34 +00:00
|
|
|
if [[ "$cur" == -* ]]; then
|
2009-06-12 20:26:54 +03:00
|
|
|
COMPREPLY=( $( compgen -W '--regular-members-file -r \
|
|
|
|
--digest-members-file -d --welcome-msg -w \
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
--admin-notify -a --help -h' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
else
|
|
|
|
_mailman_lists
|
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _add_members add_members
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have remove_members &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_remove_members()
|
|
|
|
{
|
2009-06-12 20:26:54 +03:00
|
|
|
local cur prev split=false
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2004-03-30 21:05:34 +00:00
|
|
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
|
|
|
2009-06-12 20:26:54 +03:00
|
|
|
_split_longopt && split=true
|
|
|
|
|
2004-03-30 21:05:34 +00:00
|
|
|
case "$prev" in
|
2009-06-12 20:26:54 +03:00
|
|
|
-@(f|-file))
|
2004-03-30 21:05:34 +00:00
|
|
|
_filedir
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2009-06-12 20:26:54 +03:00
|
|
|
$split && return 0
|
|
|
|
|
2004-03-30 21:05:34 +00:00
|
|
|
if [[ "$cur" == -* ]]; then
|
2009-06-12 20:26:54 +03:00
|
|
|
COMPREPLY=( $( compgen -W '--file -f --all -a \
|
2004-03-30 21:05:34 +00:00
|
|
|
--fromall --nouserack -n --noadminack -N \
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
--help -h' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
else
|
|
|
|
_mailman_lists
|
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _remove_members remove_members
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have find_member &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_find_member()
|
|
|
|
{
|
2009-06-12 20:26:54 +03:00
|
|
|
local cur prev split=false
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2004-03-30 21:05:34 +00:00
|
|
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
|
|
|
2009-06-12 20:26:54 +03:00
|
|
|
_split_longopt && split=true
|
|
|
|
|
2004-03-30 21:05:34 +00:00
|
|
|
case "$prev" in
|
2009-06-12 20:26:54 +03:00
|
|
|
-@(l|x|-listname|-exclude))
|
2004-03-30 21:05:34 +00:00
|
|
|
_mailman_lists
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2009-06-12 20:26:54 +03:00
|
|
|
$split && return 0
|
|
|
|
|
2004-03-30 21:05:34 +00:00
|
|
|
if [[ "$cur" == -* ]]; then
|
2009-06-12 20:26:54 +03:00
|
|
|
COMPREPLY=( $( compgen -W '-l --listname -x \
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
--exclude --owners -w --help -h' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _find_member find_member
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have clone_member &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_clone_member()
|
|
|
|
{
|
2009-06-12 20:26:54 +03:00
|
|
|
local cur prev split=false
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2004-03-30 21:05:34 +00:00
|
|
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
|
|
|
2009-06-12 20:26:54 +03:00
|
|
|
_split_longopt && split=true
|
|
|
|
|
2004-03-30 21:05:34 +00:00
|
|
|
case "$prev" in
|
2009-06-12 20:26:54 +03:00
|
|
|
-@(l|-listname))
|
2004-03-30 21:05:34 +00:00
|
|
|
_mailman_lists
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2009-06-12 20:26:54 +03:00
|
|
|
$split && return 0
|
|
|
|
|
2004-03-30 21:05:34 +00:00
|
|
|
if [[ "$cur" == -* ]]; then
|
2009-06-12 20:26:54 +03:00
|
|
|
COMPREPLY=( $( compgen -W '-l --listname --remove -r \
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
--admin -a --quiet -q --nomodify -n --help -h' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _clone_member clone_member
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have sync_members &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_sync_members()
|
|
|
|
{
|
2009-06-12 20:26:54 +03:00
|
|
|
local cur prev split=false
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2004-03-30 21:05:34 +00:00
|
|
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
|
|
|
2009-06-12 20:26:54 +03:00
|
|
|
_split_longopt && split=true
|
|
|
|
|
2004-03-30 21:05:34 +00:00
|
|
|
case "$prev" in
|
2009-06-12 20:26:54 +03:00
|
|
|
-@(w|g|d|--welcome-msg|-goodbye-msg|-digest))
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
COMPREPLY=( $( compgen -W 'y n' -- "$cur") )
|
2004-03-30 21:05:34 +00:00
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
-@(d|-file))
|
|
|
|
_filedir
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2009-06-12 20:26:54 +03:00
|
|
|
$split && return 0
|
|
|
|
|
2004-03-30 21:05:34 +00:00
|
|
|
if [[ "$cur" == -* ]]; then
|
2009-06-12 20:26:54 +03:00
|
|
|
COMPREPLY=( $( compgen -W '--no-change -n --welcome-msg -w \
|
|
|
|
--goodbye-msg -g --digest -d --notifyadmin -a \
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
-f --file -h --help' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
else
|
|
|
|
_mailman_lists
|
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _sync_members sync_members
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have unshunt &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_unshunt()
|
|
|
|
{
|
|
|
|
local cur
|
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
if [[ "$cur" == -* ]]; then
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
COMPREPLY=( $( compgen -W '-h --help' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
else
|
|
|
|
_filedir -d
|
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _unshunt unshunt
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have list_admins &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_list_admins()
|
|
|
|
{
|
|
|
|
local cur
|
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
if [[ "$cur" == -* ]]; then
|
2009-06-12 20:26:54 +03:00
|
|
|
COMPREPLY=( $( compgen -W '--all-vhost -v \
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
--all -a -h --help' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
else
|
|
|
|
_mailman_lists
|
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _list_admins list_admins
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have list_owners &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_list_owners()
|
|
|
|
{
|
|
|
|
local cur
|
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
if [[ "$cur" == -* ]]; then
|
|
|
|
COMPREPLY=( $( compgen -W '-w --with-listnames \
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
-m --moderators -h --help' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
else
|
|
|
|
_mailman_lists
|
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _list_owners list_owners
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have list_members &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_list_members()
|
|
|
|
{
|
2009-06-12 20:26:54 +03:00
|
|
|
local cur prev split=false
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2004-03-30 21:05:34 +00:00
|
|
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
|
|
|
2009-06-12 20:26:54 +03:00
|
|
|
_split_longopt && split=true
|
|
|
|
|
2004-03-30 21:05:34 +00:00
|
|
|
case "$prev" in
|
|
|
|
-@(o|-output))
|
|
|
|
_filedir
|
|
|
|
return 0
|
|
|
|
;;
|
2009-06-12 20:26:54 +03:00
|
|
|
-@(d|-digest))
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
COMPREPLY=( $( compgen -W 'mime plain' -- "$cur") )
|
2004-03-30 21:05:34 +00:00
|
|
|
return 0
|
|
|
|
;;
|
2009-06-12 20:26:54 +03:00
|
|
|
-@(n|-nomail))
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
COMPREPLY=( $( compgen -W 'byadmin byuser bybounce unknown' -- "$cur") )
|
2004-03-30 21:05:34 +00:00
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2009-06-12 20:26:54 +03:00
|
|
|
$split && return 0
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
if [[ "$cur" == -* ]]; then
|
|
|
|
COMPREPLY=( $( compgen -W '--output -o --regular -r \
|
2009-06-12 20:26:54 +03:00
|
|
|
--digest -d --nomail -n --fullnames -f \
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
--preserve -p -h --help' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
else
|
|
|
|
_mailman_lists
|
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _list_members list_members
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have change_pw &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_change_pw()
|
|
|
|
{
|
2009-06-12 20:26:54 +03:00
|
|
|
local cur prev split=false
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2004-03-30 21:05:34 +00:00
|
|
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
|
|
|
2009-06-12 20:26:54 +03:00
|
|
|
_split_longopt && split=true
|
|
|
|
|
2004-03-30 21:05:34 +00:00
|
|
|
case "$prev" in
|
2009-06-12 20:26:54 +03:00
|
|
|
-@(l|-listname))
|
2004-03-30 21:05:34 +00:00
|
|
|
_mailman_lists
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2009-06-12 20:26:54 +03:00
|
|
|
$split && return 0
|
|
|
|
|
2004-03-30 21:05:34 +00:00
|
|
|
if [[ "$cur" == -* ]]; then
|
2009-06-12 20:26:54 +03:00
|
|
|
COMPREPLY=( $( compgen -W '-a --all --domain -d --listname -l \
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
--password -p --quiet -q -h --help' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _change_pw change_pw
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have withlist &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_withlist()
|
|
|
|
{
|
|
|
|
local cur
|
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
if [[ "$cur" == -* ]]; then
|
|
|
|
COMPREPLY=( $( compgen -W '-l --lock -i --interactive \
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
-r --run -a --all -q --quiet -h --help' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
else
|
|
|
|
_mailman_lists
|
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _withlist withlist
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have newlist &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_newlist()
|
|
|
|
{
|
|
|
|
local cur
|
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
if [[ "$cur" == -* ]]; then
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
COMPREPLY=( $( compgen -W '-l --language -q --quiet -h --help' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
else
|
|
|
|
_mailman_lists
|
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _newlist newlist
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have rmlist &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_rmlist()
|
|
|
|
{
|
|
|
|
local cur
|
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
if [[ "$cur" == -* ]]; then
|
|
|
|
COMPREPLY=( $( compgen -W '--archives -a \
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
-h --help' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
else
|
|
|
|
_mailman_lists
|
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _rmlist rmlist
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have config_list &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_config_list()
|
|
|
|
{
|
2009-06-12 20:26:54 +03:00
|
|
|
local cur prev split=false
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2009-06-12 20:26:54 +03:00
|
|
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
|
|
|
|
|
|
_split_longopt && split=true
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
case "$prev" in
|
|
|
|
-@(i|o|-inputfile|-outputfile))
|
|
|
|
_filedir
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2009-06-12 20:26:54 +03:00
|
|
|
$split && return 0
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
if [[ "$cur" == -* ]]; then
|
|
|
|
COMPREPLY=( $( compgen -W '--inputfile -i --outputfile -o \
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
--checkonly -c --verbose -v -h --help' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
else
|
|
|
|
_mailman_lists
|
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _config_list $filenames config_list
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have arch &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_arch()
|
|
|
|
{
|
2009-06-12 20:26:54 +03:00
|
|
|
local cur prev split=false
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2004-03-30 21:05:34 +00:00
|
|
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
|
|
|
2009-06-12 20:26:54 +03:00
|
|
|
_split_longopt && split=true
|
|
|
|
|
2004-03-30 21:05:34 +00:00
|
|
|
case "$prev" in
|
2009-06-12 20:26:54 +03:00
|
|
|
-@(w|g|d|--welcome-msg|-goodbye-msg|-digest))
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
COMPREPLY=( $( compgen -W 'y n' -- "$cur") )
|
2004-03-30 21:05:34 +00:00
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
-@(d|-file))
|
|
|
|
_filedir
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2009-06-12 20:26:54 +03:00
|
|
|
$split && return 0
|
|
|
|
|
2004-03-30 21:05:34 +00:00
|
|
|
if [[ "$cur" == -* ]]; then
|
2009-06-12 20:26:54 +03:00
|
|
|
COMPREPLY=( $( compgen -W '--wipe -s --start -e --end \
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
-q --quiet -h --help' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
else
|
|
|
|
args=$COMP_CWORD
|
|
|
|
for (( i=1; i < COMP_CWORD; i++ )); do
|
|
|
|
if [[ "${COMP_WORDS[i]}" == -* ]]; then
|
|
|
|
args=$(($args-1))
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
case $args in
|
|
|
|
1)
|
|
|
|
_mailman_lists
|
|
|
|
;;
|
2009-07-25 13:38:42 +03:00
|
|
|
2)
|
2004-03-30 21:05:34 +00:00
|
|
|
_filedir
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _arch $filenames arch
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have cleanarch &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_cleanarch()
|
|
|
|
{
|
|
|
|
local cur
|
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
if [[ "$cur" == -* ]]; then
|
|
|
|
COMPREPLY=( $( compgen -W '-s --status -n --dry-run \
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
-q --quiet -h --help' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _cleanarch cleanarch
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have inject &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_inject()
|
|
|
|
{
|
2009-06-12 20:26:54 +03:00
|
|
|
local cur prev split=false
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2004-03-30 21:05:34 +00:00
|
|
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
|
|
|
2009-06-12 20:26:54 +03:00
|
|
|
_split_longopt && split=true
|
|
|
|
|
2004-03-30 21:05:34 +00:00
|
|
|
case "$prev" in
|
2009-06-12 20:26:54 +03:00
|
|
|
-@(l|-listname))
|
2004-03-30 21:05:34 +00:00
|
|
|
_mailman_lists
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2009-06-12 20:26:54 +03:00
|
|
|
$split && return 0
|
|
|
|
|
2004-03-30 21:05:34 +00:00
|
|
|
if [[ "$cur" == -* ]]; then
|
2009-06-12 20:26:54 +03:00
|
|
|
COMPREPLY=( $( compgen -W '-l --listname -q --queue \
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
-h --help' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
else
|
|
|
|
_filedir
|
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _inject $filenames inject
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have dumpdb &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_dumpdb()
|
|
|
|
{
|
|
|
|
local cur
|
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
if [[ "$cur" == -* ]]; then
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
COMPREPLY=( $( compgen -W '--marshal -m --pickle -p --noprint -n -h --help' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
else
|
|
|
|
_filedir
|
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _dumpdb $filenames dumpdb
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have check_db &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_check_db()
|
|
|
|
{
|
|
|
|
local cur
|
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
if [[ "$cur" == -* ]]; then
|
|
|
|
COMPREPLY=( $( compgen -W '--all -a --verbose -v \
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
-h --help' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
else
|
|
|
|
_mailman_lists
|
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _check_db check_db
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have check_perms &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_check_perms()
|
|
|
|
{
|
|
|
|
local cur
|
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
if [[ "$cur" == -* ]]; then
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
COMPREPLY=( $( compgen -W '-f -v -h' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _check_perms check_perms
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have genaliases &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_genaliases()
|
|
|
|
{
|
|
|
|
local cur
|
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
if [[ "$cur" == -* ]]; then
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
COMPREPLY=( $( compgen -W '-q --quiet -h --help' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _genaliases genaliases
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have mmsitepass &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_mmsitepass()
|
|
|
|
{
|
|
|
|
local cur
|
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
if [[ "$cur" == -* ]]; then
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
COMPREPLY=( $( compgen -W '-c --listcreator -h --help' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _mmsitepass mmsitepass
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have qrunner &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_qrunner()
|
|
|
|
{
|
2009-06-12 20:26:54 +03:00
|
|
|
local cur prev
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2009-06-12 20:26:54 +03:00
|
|
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
|
|
|
|
|
|
_split_longopt && return 0
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
if [[ "$cur" == -* ]]; then
|
2009-06-12 20:26:54 +03:00
|
|
|
COMPREPLY=( $( compgen -W '-r --runner --once -o \
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
-l --list -v --verbose -s --subproc -h --help' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _qrunner qrunner
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
have mailmanctl &&
|
2004-03-30 21:05:34 +00:00
|
|
|
_mailmanctl()
|
|
|
|
{
|
|
|
|
local cur
|
|
|
|
|
|
|
|
COMPREPLY=()
|
2008-05-10 18:04:06 +02:00
|
|
|
cur=`_get_cword`
|
2004-03-30 21:05:34 +00:00
|
|
|
|
|
|
|
if [[ "$cur" == -* ]]; then
|
|
|
|
COMPREPLY=( $( compgen -W '-n --no-restart -u --run-as-user \
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
-s --stale-lock-cleanup --quiet -q -h --help' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
else
|
Quote unquoted $cur to prevent globbing.
Closes Alioth #311614
Globbing might occur if $cur contains one of these globbing characters: * ? [ ]
The bug becomes apparent:
On Cygwin if the glob-string contains backslashes as well, causing a warning (Cygwin >= 1.7):
MS-DOS style path detected: ...
Preferred POSIX equivalent is: ...
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
On Linux, using strace, you can see bash-completion doing an unnecessary `open' system call.
Steps to reproduce on Linux using `strace':
Environment: Linux, bash-completion-1.0
1. Start bash with bash-completion loaded and find out PID ($$):
$ echo $$
MYPID
2. In a second bash shell, `strace' the above PID:
$ strace -e trace=open -f -o strace.log -p MYPID
3. Within the first bash shell, type:
$ cur="?"; _kernel_versions
4. In the second bash shell, type ^C to quick `strace'.
5. Check `strace.log', here you can see bash accessing
something it shouldn't:
...
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
...
6. The above call to `open' disappears if $cur in _kernel_versions gets
quoted, and you repeat the steps above:
_kernel_versions()
{
COMPREPLY=( $( compgen -W '$( command ls /lib/modules )' -- "$cur" ) )
}
2009-09-25 09:36:29 +02:00
|
|
|
COMPREPLY=( $( compgen -W 'start stop restart reopen' -- "$cur" ) )
|
2004-03-30 21:05:34 +00:00
|
|
|
fi
|
|
|
|
|
2009-06-12 20:24:00 +03:00
|
|
|
} &&
|
2004-03-30 21:05:34 +00:00
|
|
|
complete -F _mailmanctl mailmanctl
|
2009-10-01 20:54:51 +03:00
|
|
|
|
|
|
|
# Local variables:
|
|
|
|
# mode: shell-script
|
|
|
|
# sh-basic-offset: 8
|
|
|
|
# sh-indent-comment: t
|
|
|
|
# indent-tabs-mode: t
|
|
|
|
# End:
|
|
|
|
# ex: ts=8 sw=8 noet filetype=sh
|