On Thu, Mar 16, 2006 at 08:45:14AM +0100, Anselm R. Garbe wrote:
> That sounds veru weird. You never should write \n in tag strings
> because this is a fs interface and \n are valid characters, thus
> writing foo\n will write exactly foo\n to the tags file. That
> you get empty entries in /tags might only be related to these
> \n's (they insert newlines when fprinting to stdout).
>
> Though \n chars might be treated by the wmiirc event loop.
>
> I'd use following syntax instead (also the extern prefix looks
> wrong, because writing to the fs does not need any env
> cleanups):
>
> $MODKEY-Control-Shift-t)
> echo -n `wmiir read /tags | sort | wmiimenu` | wmiir write
> /ws/sel/sel/tags &;;
>
> $MODKEY-Control-t)
> echo -n select `wmiir read /tags | sort | wmiimenu` | wmiir write /ctl
> &;;
>
> (Though untested)
Hello Anselm,
this works as well as using xwrite (which does just the same). It also
resolves the problem of empty tags in /tags and clicking on the labels
works now as well. However I wonder why I need the echo -n but can't
just do
wmiir read /tags | sort | wmiimenu | wmiir write /ws/sel/sel/tags ;;
to assign new tags. This had been my first approach.
Do you recommend the use of "&"? When using xwrite you don't have it...
Going to try the new snap now...
Regards,
Stefan
_______________________________________________
[email protected] mailing list
http://wmii.de/cgi-bin/mailman/listinfo/wmii