Re: [dev] [dmenu] history patch updated r471

From: Peter John Hartman <peterjohnhartman_AT_gmail.com>
Date: Thu, 8 Dec 2011 11:57:08 -0500

> function had to be run twice, so I did a quick & dirty #define, knowing
> that the C experts in the Suckless Community can suggest better ways.

The better way is this:

sel=`tac history.txt | dmenu`
[ -n "$sel" ] && sed -i "\|$sel|d" history.txt; echo "$sel" >> history.txt

Or something of the sort.

Best, Peter


-- 
sic dicit magister P
University of Toronto / Fordham University
Collins Hall B06; Office Hours TF10-12
http://individual.utoronto.ca/peterjh
gpg --keyserver pgp.mit.edu --recv-keys E0DBD3D6 
Received on Thu Dec 08 2011 - 17:57:08 CET

This archive was generated by hypermail 2.3.0 : Thu Dec 08 2011 - 18:00:06 CET