[wmii] simple tag permutations

From: Suraj N. Kurapati <skurapat_AT_ucsc.edu>
Date: Tue, 11 Apr 2006 11:56:15 -0700

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

Here's a little trick you can try, if you have the GNU BASH shell,
to get auto-completion for combinations of tags in wmiimenu. It uses
the {} braces permutation operator.

Cheers.

## the code (for wmiirc):

$MODKEY-Shift-t)
  tags=`wmiir read /tags`
  tags_csv=`echo $tags | tr ' ' ','`
  tags_joined=`eval "echo {$tags_csv}+{$tags_csv}"`
  xwrite /view/sel/sel/tags "`echo $tags $tags_joined | fmt -1 |
wmiimenu`" &;;

## how it works:

yantram.j0.s0.!510~$ wmiir read /tags
1
code
fish
mail
yantram.j0.s0.!511~$ tags=`wmiir read /tags`
yantram.j0.s0.!512~$ tags_csv=`echo $tags | tr ' ' ','`
yantram.j0.s0.!513~$ tags_joined=`eval "echo {$tags_csv}+{$tags_csv}"`
yantram.j0.s0.!514~$ echo $tags $tags_joined | fmt -1
1
code
fish
mail
1+1
1+code
1+fish
1+mail
code+1
code+code
code+fish
code+mail
fish+1
fish+code
fish+fish
fish+mail
mail+1
mail+code
mail+fish
mail+mail
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEO/vPmV9O7RYnKMcRAurxAJ0SqYckJrDKGHP9yLOY+0AHUQQd1ACglLEY
Z5G3dPgmMBcvUN2405V1sCs=
=nMJK
-----END PGP SIGNATURE-----
Received on Tue Apr 11 2006 - 20:56:25 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:02:24 UTC