<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://linux-vserver.at/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://linux-vserver.at/index.php?action=history&amp;feed=atom&amp;title=util-vserver%3ABash_Completion</id>
		<title>util-vserver:Bash Completion - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://linux-vserver.at/index.php?action=history&amp;feed=atom&amp;title=util-vserver%3ABash_Completion"/>
		<link rel="alternate" type="text/html" href="http://linux-vserver.at/index.php?title=util-vserver:Bash_Completion&amp;action=history"/>
		<updated>2026-04-09T13:45:09Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.20.2</generator>

	<entry>
		<id>http://linux-vserver.at/index.php?title=util-vserver:Bash_Completion&amp;diff=38546&amp;oldid=prev</id>
		<title>Rbe at 07:32, 7 February 2014</title>
		<link rel="alternate" type="text/html" href="http://linux-vserver.at/index.php?title=util-vserver:Bash_Completion&amp;diff=38546&amp;oldid=prev"/>
				<updated>2014-02-07T07:32:06Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 07:32, 7 February 2014&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 192:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 192:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	&amp;#160; &amp;#160; fi&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	&amp;#160; &amp;#160; fi&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	else&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	else&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	&amp;#160; &amp;#160; COMPREPLY=( $( compgen -W &amp;quot;${names[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;@&lt;/del&gt;]} $cmdOpts&amp;quot; -- $cur ) )&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	&amp;#160; &amp;#160; COMPREPLY=( $( compgen -W &amp;quot;${names[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/ins&gt;]} $cmdOpts&amp;quot; -- $cur ) )&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	fi&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	fi&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	return 0&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	return 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 253:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 253:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	&amp;#160; &amp;#160; fi&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	&amp;#160; &amp;#160; fi&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	else&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	else&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	&amp;#160; &amp;#160; COMPREPLY=( $( compgen -W &amp;quot;${names[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;@&lt;/del&gt;]} $cmdOpts&amp;quot; -- $cur ) )&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	&amp;#160; &amp;#160; COMPREPLY=( $( compgen -W &amp;quot;${names[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/ins&gt;]} $cmdOpts&amp;quot; -- $cur ) )&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	fi&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	fi&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; fi&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; fi&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 302:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 302:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	return 0&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	return 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; else&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; else&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	COMPREPLY=( $( compgen -W &amp;quot;${names[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;@&lt;/del&gt;]} $cmdOpts&amp;quot; -- $cur ) )&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;	COMPREPLY=( $( compgen -W &amp;quot;${names[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/ins&gt;]} $cmdOpts&amp;quot; -- $cur ) )&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; fi&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; fi&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; return 0&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; return 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Rbe</name></author>	</entry>

	<entry>
		<id>http://linux-vserver.at/index.php?title=util-vserver:Bash_Completion&amp;diff=5025&amp;oldid=prev</id>
		<title>Glenn: + Category:Configuration</title>
		<link rel="alternate" type="text/html" href="http://linux-vserver.at/index.php?title=util-vserver:Bash_Completion&amp;diff=5025&amp;oldid=prev"/>
				<updated>2011-10-21T21:19:07Z</updated>
		
		<summary type="html">&lt;p&gt;+ &lt;a href=&quot;/Category:Configuration&quot; title=&quot;Category:Configuration&quot;&gt;Category:Configuration&lt;/a&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 21:19, 21 October 2011&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 318:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 318:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;:0.3.1 : Add the command vapt-get vrpm vyum vserver-copy&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;:0.3.1 : Add the command vapt-get vrpm vyum vserver-copy&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;:0.2.0 : First release with just the command vserver&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;:0.2.0 : First release with just the command vserver&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Configuration]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Glenn</name></author>	</entry>

	<entry>
		<id>http://linux-vserver.at/index.php?title=util-vserver:Bash_Completion&amp;diff=2261&amp;oldid=prev</id>
		<title>Daniel hozac: use nowiki and pre to avoid links</title>
		<link rel="alternate" type="text/html" href="http://linux-vserver.at/index.php?title=util-vserver:Bash_Completion&amp;diff=2261&amp;oldid=prev"/>
				<updated>2007-01-28T21:13:05Z</updated>
		
		<summary type="html">&lt;p&gt;use nowiki and pre to avoid links&lt;/p&gt;
&lt;a href=&quot;http://linux-vserver.at/index.php?title=util-vserver:Bash_Completion&amp;amp;diff=2261&amp;amp;oldid=2032&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Daniel hozac</name></author>	</entry>

	<entry>
		<id>http://linux-vserver.at/index.php?title=util-vserver:Bash_Completion&amp;diff=2032&amp;oldid=prev</id>
		<title>Hollow: Vserver Completion moved to util-vserver:Bash Completion: wrong namespace!</title>
		<link rel="alternate" type="text/html" href="http://linux-vserver.at/index.php?title=util-vserver:Bash_Completion&amp;diff=2032&amp;oldid=prev"/>
				<updated>2006-12-01T07:44:59Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;a href=&quot;/index.php?title=Vserver_Completion&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Vserver Completion (page does not exist)&quot;&gt;Vserver Completion&lt;/a&gt; moved to &lt;a href=&quot;/util-vserver:Bash_Completion&quot; title=&quot;util-vserver:Bash Completion&quot;&gt;util-vserver:Bash Completion&lt;/a&gt;: wrong namespace!&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 07:44, 1 December 2006&lt;/td&gt;
			&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Hollow</name></author>	</entry>

	<entry>
		<id>http://linux-vserver.at/index.php?title=util-vserver:Bash_Completion&amp;diff=2030&amp;oldid=prev</id>
		<title>82.225.0.224 at 21:36, 30 November 2006</title>
		<link rel="alternate" type="text/html" href="http://linux-vserver.at/index.php?title=util-vserver:Bash_Completion&amp;diff=2030&amp;oldid=prev"/>
				<updated>2006-11-30T21:36:13Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;To test this, put the source in your .bashrc or put it in the file /etc/bash_completion.d/vserver (Debian).&lt;br /&gt;
&lt;br /&gt;
This release (0.4) supports the commands vserver vapt-get vrpm vyum vserver-copy.&lt;br /&gt;
&lt;br /&gt;
This script is included in the util-vserver Debian package, and is automatically installed into /etc/bash_completion.d/vserver when you install this package.&lt;br /&gt;
&lt;br /&gt;
For zsh completion, the Debian zsh package has the vserver completion included, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=365238 for the source, or https://intrigeri.boum.org/svn/pub/home/modules/base/.zsh/functions/_vserver for the upstream SVN repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # Completion for the vserver command. Source this file (or on some systems&lt;br /&gt;
 # add it to ~/.bash_completion and start a new shell) and bash's completion&lt;br /&gt;
 # mechanism will know all about vserver's options!&lt;br /&gt;
 #&lt;br /&gt;
 # Copyright (C) Thomas Champagne &amp;lt;lafeuil@gmail.com&amp;gt;&lt;br /&gt;
 #&lt;br /&gt;
 # This program is free software; you can redistribute it and/or modify&lt;br /&gt;
 # it under the terms of the GNU General Public License as published by&lt;br /&gt;
 # the Free Software Foundation; either version 2, or (at your option)&lt;br /&gt;
 # any later version.&lt;br /&gt;
 #&lt;br /&gt;
 # This program is distributed in the hope that it will be useful,&lt;br /&gt;
 # but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;br /&gt;
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;br /&gt;
 # GNU General Public License for more details.&lt;br /&gt;
 #&lt;br /&gt;
 # You should have received a copy of the GNU General Public License&lt;br /&gt;
 # along with this program; if not, write to the Free Software Foundation,&lt;br /&gt;
 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.&lt;br /&gt;
 #&lt;br /&gt;
 # The latest version of this software can be obtained here:&lt;br /&gt;
 #&lt;br /&gt;
 # http://linux-vserver.org/Vserver_Completion&lt;br /&gt;
 #&lt;br /&gt;
 # version 0.4.1&lt;br /&gt;
 &lt;br /&gt;
 have vserver-info &amp;amp;&amp;amp; {&lt;br /&gt;
 &lt;br /&gt;
 : ${UTIL_VSERVER_VARS:=$(vserver-info - SYSINFO |grep prefix: | awk '{ print $2}')/lib/util-vserver/util-vserver-vars}&lt;br /&gt;
 test -e &amp;quot;$UTIL_VSERVER_VARS&amp;quot; &amp;amp;&amp;amp; {&lt;br /&gt;
        &lt;br /&gt;
 if [ -z &amp;quot;$_VS_NEWLINE&amp;quot; -o -z &amp;quot;$VS_ALLVSERVERS_ARGS&amp;quot; ]&lt;br /&gt;
 then&lt;br /&gt;
         . &amp;quot;$UTIL_VSERVER_VARS&amp;quot;&lt;br /&gt;
         . &amp;quot;$_LIB_FUNCTIONS&amp;quot;&lt;br /&gt;
 fi&lt;br /&gt;
 &lt;br /&gt;
 _vserver() {&lt;br /&gt;
    local cur cmds cmdOpts cmdMethodOpts helpCmds names names_pipe func i j method&lt;br /&gt;
    &lt;br /&gt;
    COMPREPLY=()&lt;br /&gt;
    cur=${COMP_WORDS[COMP_CWORD]}&lt;br /&gt;
    &lt;br /&gt;
    # find available v-servers: &lt;br /&gt;
    # call function getAllVservers in vserver library&lt;br /&gt;
    getAllVservers names&lt;br /&gt;
    names_pipe=`echo ${names[@]} | sed 's/ /|/g'`&lt;br /&gt;
    &lt;br /&gt;
    # available commands&lt;br /&gt;
    cmds='start stop restart condrestart suexec exec enter chkconfig \&lt;br /&gt;
        running status unify pkg apt-get apt-config apt-cache \&lt;br /&gt;
        rpm pkgmgmt delete'&lt;br /&gt;
    &lt;br /&gt;
    # options (long and short name)&lt;br /&gt;
    cmdOpts='--help --version --debug --defaulttty -s --sync -v \&lt;br /&gt;
        --verbose --silent --'&lt;br /&gt;
    &lt;br /&gt;
    cmdMethodOpts='-m -n --context --confdir --lockfile \&lt;br /&gt;
        --hostname --netdev --netbcast --netmask \&lt;br /&gt;
        --netprefix --interface --cpuset \&lt;br /&gt;
        --cpusetcpus --cpusetmems --cpusetvirt \&lt;br /&gt;
        --initstyle --flags --help --'&lt;br /&gt;
    &lt;br /&gt;
    # if the previous option is a single option &lt;br /&gt;
    helpCmds='--help|--version'&lt;br /&gt;
    if [[ ${COMP_WORDS[1]} == @($helpCmds) ]] &lt;br /&gt;
    then&lt;br /&gt;
        return 0&lt;br /&gt;
    fi&lt;br /&gt;
    &lt;br /&gt;
    # search a verser's name&lt;br /&gt;
    for (( i=0; i &amp;lt; ${#COMP_WORDS[@]}-1; i++ ))&lt;br /&gt;
    do&lt;br /&gt;
        if [[ ${COMP_WORDS[i]} == @($names_pipe) ]]&lt;br /&gt;
        then&lt;br /&gt;
          # it's found&lt;br /&gt;
            break&lt;br /&gt;
        fi&lt;br /&gt;
    done&lt;br /&gt;
    &lt;br /&gt;
        #a vserver has been found &lt;br /&gt;
    if (( $i &amp;lt; ${#COMP_WORDS[@]}-1 )) &lt;br /&gt;
    then &lt;br /&gt;
        #Show the vserver command without build&lt;br /&gt;
        case &amp;quot;${COMP_WORDS[i+1]}&amp;quot; in&lt;br /&gt;
            start)&lt;br /&gt;
                COMPREPLY=( $( compgen -W &amp;quot;--rescue --rescue-cmd&amp;quot; -- $cur ) )&lt;br /&gt;
                ;;&lt;br /&gt;
            # No completion for apt-config&lt;br /&gt;
            stop|restart|condrestart|enter|running|status|apt-config|delete)&lt;br /&gt;
                ;;&lt;br /&gt;
            suexec)&lt;br /&gt;
                # I don't know how to do&lt;br /&gt;
                COMPREPLY=( $( compgen -W  -- $cur ) )&lt;br /&gt;
                ;;&lt;br /&gt;
            exec)&lt;br /&gt;
                #I don't know how to do&lt;br /&gt;
                COMPREPLY=( $( compgen -W &amp;quot;&amp;quot; -- $cur ) )&lt;br /&gt;
                ;;&lt;br /&gt;
            unify)&lt;br /&gt;
                COMPREPLY=( $( compgen -W &amp;quot;-R&amp;quot; -- $cur ) )&lt;br /&gt;
                ;;&lt;br /&gt;
            apt-get|apt-cache)&lt;br /&gt;
                func=${COMP_WORDS[i+1]}&lt;br /&gt;
                COMP_WORDS=( ${COMP_WORDS[@]:$((i+1))} )&lt;br /&gt;
                COMP_CWORD=$((COMP_CWORD-i-1))&lt;br /&gt;
                declare -f _${func//-/_} &amp;gt; /dev/null &amp;amp;&amp;amp; _${func//-/_}&lt;br /&gt;
                ;;&lt;br /&gt;
            *)&lt;br /&gt;
                COMPREPLY=( $( compgen -W &amp;quot;$cmds&amp;quot; -- $cur ) )   &lt;br /&gt;
                ;;&lt;br /&gt;
        esac&lt;br /&gt;
        return 0&lt;br /&gt;
    else&lt;br /&gt;
        #no vserver name found&lt;br /&gt;
        prev=${COMP_WORDS[COMP_CWORD-1]}&lt;br /&gt;
        &lt;br /&gt;
        #search the new name of vserver &lt;br /&gt;
        for (( i=0; i &amp;lt; ${#COMP_WORDS[@]}-1; i++ )); do&lt;br /&gt;
            if [[ ${COMP_WORDS[i]} == !(vserver|-*) ]];  then&lt;br /&gt;
                # it's found&lt;br /&gt;
                break&lt;br /&gt;
            fi&lt;br /&gt;
        done&lt;br /&gt;
                &lt;br /&gt;
        if (( $i &amp;lt; ${#COMP_WORDS[@]}-1 )) ; then &lt;br /&gt;
            j=$i&lt;br /&gt;
            i=${#COMP_WORDS[@]}&lt;br /&gt;
            for (( ; j &amp;lt; ${#COMP_WORDS[@]}-1; j++ )); do&lt;br /&gt;
                if [[ ${COMP_WORDS[j]} == &amp;quot;--&amp;quot; ]];  then&lt;br /&gt;
                    # method's parameter&lt;br /&gt;
                    case &amp;quot;$method&amp;quot; in&lt;br /&gt;
                        legacy|copy)&lt;br /&gt;
                            ;;&lt;br /&gt;
                        apt-rpm)&lt;br /&gt;
                            COMPREPLY=( $( compgen -W &amp;quot;-d&amp;quot; -- $cur ) )&lt;br /&gt;
                            ;;&lt;br /&gt;
                        yum)&lt;br /&gt;
                            COMPREPLY=( $( compgen -W &amp;quot;-d&amp;quot; -- $cur ) )&lt;br /&gt;
                            ;;&lt;br /&gt;
                        rpm) &lt;br /&gt;
                            COMPREPLY=( $( compgen -W &amp;quot;-d --empty --force --nodeps&amp;quot; -- $cur ) )&lt;br /&gt;
                            ;;&lt;br /&gt;
                        skeleton)&lt;br /&gt;
                            ;;&lt;br /&gt;
                        debootstrap)&lt;br /&gt;
                            COMPREPLY=( $( compgen -W &amp;quot;-d -m -s --&amp;quot; -- $cur ) )&lt;br /&gt;
                            ;;&lt;br /&gt;
                        *)&lt;br /&gt;
                            #do nothing &lt;br /&gt;
                            #the method is not defined&lt;br /&gt;
                            ;;&lt;br /&gt;
                    esac&lt;br /&gt;
                    return 0&lt;br /&gt;
                    break&lt;br /&gt;
                fi&lt;br /&gt;
                if [[ ${COMP_WORDS[j]} == @(build|-m) ]];  then&lt;br /&gt;
                    i=$j&lt;br /&gt;
                    if (( $j+1 &amp;lt; ${#COMP_WORDS[@]}-1 )) ; then&lt;br /&gt;
                        method=${COMP_WORDS[j+1]}&lt;br /&gt;
                    fi&lt;br /&gt;
                fi&lt;br /&gt;
            done &lt;br /&gt;
            &lt;br /&gt;
            if (( $i &amp;lt; ${#COMP_WORDS[@]}-1 )) ; then&lt;br /&gt;
                case $prev in&lt;br /&gt;
                    --help)&lt;br /&gt;
                        #do nothing&lt;br /&gt;
                        ;;&lt;br /&gt;
                    -n|--context|--confdir|--lockfile|--hostname|--netdev|--netbcast|--netmask|--netprefix|--interface|--cpuset|--cpusetcpus|--cpusetmems|--cpusetvirt|--initstyle|--flags)&lt;br /&gt;
                        COMPREPLY=( $( compgen -W &amp;quot;&amp;quot; -- $cur ) )&lt;br /&gt;
                        ;;&lt;br /&gt;
                    -m)&lt;br /&gt;
                        COMPREPLY=( $( compgen -W &amp;quot;legacy copy apt-rpm yum rpm skeleton debootstrap&amp;quot; -- $cur ) )&lt;br /&gt;
                        ;;&lt;br /&gt;
                    *)&lt;br /&gt;
                        COMPREPLY=( $( compgen -W &amp;quot;$cmdMethodOpts&amp;quot; -- $cur ) )&lt;br /&gt;
                        ;;&lt;br /&gt;
                esac&lt;br /&gt;
                &lt;br /&gt;
            else&lt;br /&gt;
                COMPREPLY=( $( compgen -W &amp;quot;build&amp;quot; -- $cur ) )&lt;br /&gt;
            fi&lt;br /&gt;
        else&lt;br /&gt;
            COMPREPLY=( $( compgen -W &amp;quot;${names[@]} $cmdOpts&amp;quot; -- $cur ) )&lt;br /&gt;
        fi&lt;br /&gt;
        return 0&lt;br /&gt;
    fi&lt;br /&gt;
    &lt;br /&gt;
    return 0&lt;br /&gt;
 }&lt;br /&gt;
 complete -F _vserver vserver&lt;br /&gt;
  &lt;br /&gt;
 _vapt_rpm_yum()&lt;br /&gt;
 {&lt;br /&gt;
    local cur cmds cmdOpts helpCmds names func i&lt;br /&gt;
 &lt;br /&gt;
    COMPREPLY=()&lt;br /&gt;
    cur=${COMP_WORDS[COMP_CWORD]}&lt;br /&gt;
    &lt;br /&gt;
    # options (long and short name)&lt;br /&gt;
    cmdOpts='--help --version --quiet -q --all'&lt;br /&gt;
    &lt;br /&gt;
    # if the previous option is a single option &lt;br /&gt;
    helpCmds='--help|--version'&lt;br /&gt;
    if [[ &amp;quot;${COMP_WORDS[1]}&amp;quot; == &amp;quot;@($helpCmds)&amp;quot; ]] ; then&lt;br /&gt;
        return 0&lt;br /&gt;
    fi&lt;br /&gt;
    &lt;br /&gt;
    # search --&lt;br /&gt;
    for (( i=0; i &amp;lt; ${#COMP_WORDS[@]}-1; i++ )); do&lt;br /&gt;
        if [[ ${COMP_WORDS[i]} = &amp;quot;--&amp;quot; ]];  then&lt;br /&gt;
            # it's found&lt;br /&gt;
            break&lt;br /&gt;
        fi&lt;br /&gt;
    done&lt;br /&gt;
    &lt;br /&gt;
    # find available v-servers: &lt;br /&gt;
    # call function getAllVservers in vserver library&lt;br /&gt;
    getAllVservers names&lt;br /&gt;
    names_pipe=`echo ${names[@]}&amp;quot; --all&amp;quot; | sed 's/ /|/g'`&lt;br /&gt;
    &lt;br /&gt;
    if (( $i &amp;lt; ${#COMP_WORDS[@]}-1 )) &amp;amp;&amp;amp; (( $i &amp;lt; $COMP_CWORD )) ; then &lt;br /&gt;
        func=${COMP_WORDS[0]:1}&lt;br /&gt;
        COMP_WORDS=( $func ${COMP_WORDS[@]:$((i+1))} )&lt;br /&gt;
        COMP_CWORD=$((COMP_CWORD-i))&lt;br /&gt;
        declare -f _${func//-/_} &amp;gt; /dev/null &amp;amp;&amp;amp; _${func//-/_}&lt;br /&gt;
    else        &lt;br /&gt;
        # search a verser's name&lt;br /&gt;
        for (( i=0; i &amp;lt;  ${#COMP_WORDS[@]}-1; i++ )); do&lt;br /&gt;
            if [[ ${COMP_WORDS[i]} == @($names_pipe) ]];  then&lt;br /&gt;
                # it's found&lt;br /&gt;
                break&lt;br /&gt;
            fi&lt;br /&gt;
        done&lt;br /&gt;
 &lt;br /&gt;
        if (( $i &amp;lt; ${#COMP_WORDS[@]}-1 )) ; then &lt;br /&gt;
            if [[ &amp;quot;${COMP_WORDS[i]}&amp;quot; = &amp;quot;--all&amp;quot;  ]]; then&lt;br /&gt;
                cmdOpts='--'&lt;br /&gt;
                COMPREPLY=( $( compgen -W &amp;quot;$cmdOpts&amp;quot; -- $cur ) )&lt;br /&gt;
            else&lt;br /&gt;
                cmdOpts='--'&lt;br /&gt;
                COMPREPLY=( $( compgen -W &amp;quot;${names[@]} $cmdOpts&amp;quot; -- $cur ) )&lt;br /&gt;
            fi&lt;br /&gt;
        else&lt;br /&gt;
            COMPREPLY=( $( compgen -W &amp;quot;${names[@]} $cmdOpts&amp;quot; -- $cur ) )&lt;br /&gt;
        fi&lt;br /&gt;
    fi&lt;br /&gt;
    return 0&lt;br /&gt;
 }&lt;br /&gt;
 complete -F _vapt_rpm_yum vapt-get&lt;br /&gt;
 complete -F _vapt_rpm_yum vrpm&lt;br /&gt;
 complete -F _vapt_rpm_yum vyum&lt;br /&gt;
 &lt;br /&gt;
 _vserver_copy()&lt;br /&gt;
 {&lt;br /&gt;
    local cur prev cmdOpts helpCmds confCmds names names_pipe i&lt;br /&gt;
    &lt;br /&gt;
    COMPREPLY=()&lt;br /&gt;
    cur=${COMP_WORDS[COMP_CWORD]}&lt;br /&gt;
    &lt;br /&gt;
    # find available v-servers: &lt;br /&gt;
    # call function getAllVservers in vserver library&lt;br /&gt;
    getAllVservers names&lt;br /&gt;
    names_pipe=`echo ${names[@]} | sed 's/ /|/g'`&lt;br /&gt;
    &lt;br /&gt;
    # options (long and short name)&lt;br /&gt;
    cmdOpts='--help -h --version -V --verbose -v --quiet -q \&lt;br /&gt;
                   --vsroot -r --rsh -R --stopstart -s \&lt;br /&gt;
                   --domain -d --ip -i'&lt;br /&gt;
    &lt;br /&gt;
    # if the previous option is a single option &lt;br /&gt;
    helpCmds='--help|-h|--version|-V'&lt;br /&gt;
    if [[ ${COMP_WORDS[1]} == @($helpCmds) ]] ; then&lt;br /&gt;
        return 0&lt;br /&gt;
    fi&lt;br /&gt;
    &lt;br /&gt;
    confCmds='--ip|-i|--domain|-d'&lt;br /&gt;
    prev=${COMP_WORDS[COMP_CWORD-1]}&lt;br /&gt;
    if [[ $prev == @($confCmds) ]]; then&lt;br /&gt;
        return 0&lt;br /&gt;
    fi&lt;br /&gt;
    &lt;br /&gt;
    # search a verser's name&lt;br /&gt;
    for (( i=0; i &amp;lt;  ${#COMP_WORDS[@]}-1; i++ )); do&lt;br /&gt;
        if [[ ${COMP_WORDS[i]} == @($names_pipe) ]];  then&lt;br /&gt;
            # it's found&lt;br /&gt;
            break&lt;br /&gt;
        fi&lt;br /&gt;
    done&lt;br /&gt;
    &lt;br /&gt;
    if (( $i &amp;lt; ${#COMP_WORDS[@]}-1 )) ; then &lt;br /&gt;
        return 0&lt;br /&gt;
    else&lt;br /&gt;
        COMPREPLY=( $( compgen -W &amp;quot;${names[@]} $cmdOpts&amp;quot; -- $cur ) )&lt;br /&gt;
    fi&lt;br /&gt;
    return 0&lt;br /&gt;
 }&lt;br /&gt;
 complete -F _vserver_copy vserver-copy&lt;br /&gt;
 &lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Changelog :&lt;br /&gt;
:0.4.1 : handle multiple sourcing scenarios&lt;br /&gt;
:0.4.0 : Update command vserver build&lt;br /&gt;
:0.3.2 : Add Licence&lt;br /&gt;
:0.3.1 : Add the command vapt-get vrpm vyum vserver-copy&lt;br /&gt;
:0.2.0 : First release with just the command vserver&lt;/div&gt;</summary>
		<author><name>82.225.0.224</name></author>	</entry>

	</feed>