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>" amadm
Then you can do <deployuri>/bin/amadm add-<TAB><TAB> thingy.
About

justme

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
News
Blogroll
Blog friends

No bookmarks in folder