[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] xl command autocompletion: domain names



At 17:13 +0000 on 06 Nov (1383754404), Ian Jackson wrote:
> Matthew Daley writes ("Re: xl command autocompletion: domain names"):
> > On Thu, Nov 7, 2013 at 12:16 AM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> 
> > wrote> > sudo -s opens a root shell....
> > 
> > Oh, I thought you were talking about completing a command line
> > starting with sudo -s (which I guess is pointless wrt. xl). Then yes,
> > using the shell from sudo -s would be fine.
> 
> What I meant by "use sodu" was to have the bash-completion script do
> "sudo xl list" to obtain the list of completions.  You'll probably
> want to do something like
> 
>  bash_completion_sudo () {
>     if [ x"`whoami`" = xroot ]; then "$@"
>     else ${BASH_COMPLETION_SUDO-sudo} "$@"; fi
>  }
>  bash_completion_sudo xl list

Eek!  Surely implicit operations like tab-completion shouldn't do
_anything_ that requires sudo. 

Tim.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.