Dennis' Weblog
Tuesday Apr 03, 2007
Auto Complete sub command names for amadm CLI for bash user
SuperPat, my dearest pal (cough, cough!) pointed me to this blog DSEE 6.0 CLI made easier for /bin/bash users
And hinted me that we need to have this for OpenSSO. And why not. But this can be done in a different manner.
Download the opensso.war from here, deploy and configure it.
Download the amAdminTools.zip from here, unzip it in a temporary directory and run the ./setup script.
type <deployuri>/bin/amadm to check that CLI is up and running. Next
<deployuri>/bin/amadm | perl -e 'my $x; while (<>)
{ chomp; if (($_ =~ /^ ( [a-z][\S]+)/) && ($_ !~ /amadm/))
{$x .= $1; }} print $x;'
to get the list of sub commands. Then
complete -W "<paste the output of previous command>" amadmThen you can do <deployuri>/bin/amadm add-<TAB><TAB> thingy.
Posted at 01:23PM Apr 03, 2007 by justme in OpenSSO | Comments[2]
Posted by Pat Patterson on April 04, 2007 at 02:05 PM PDT #
Posted by Dennis Seah on April 04, 2007 at 11:28 PM PDT #