Re: [hackers] [dmenu][RFC][PATCH] History functionality

From: Silvan Jegen <>
Date: Thu, 3 Dec 2015 12:35:01 +0100


On Thu, Dec 3, 2015 at 11:57 AM, Xarchus <> wrote:
> And a couple of fixes for the 'history' patch:
> - fixed the code in the BEGIN block of the inline awk program in dmenu_run;
> if no history file was supplied the awk script was just ignoring any
> output from dmenu
> - improved the history/cache parsing/de-duplication awk one-liner in
> dmenu_path; the former 'NR==FNR' test was not enough: in case of a not
> supplied or empty history file it attempted to remove a count followed by a
> tab from the file names in the cache. Obviously to find such an occurrence
> would be crazy rare, so it was quite harmless (I suppose that you don't
> have any executables in your path of the form "count\tname", do you ?
> Anyway, now you can :) )
> New patch attached.


At the moment I don't have time to test the patch I am afraid but I
will test it as soon as I find the time.

I would prefer to not deal with the case the HISTORY is unset and just
assume it is. The reason being that if people don't want to use the
history functionality, they should not use this patch. Under this
assumption the code can be further simplified.

I also prefer setting the HISTORY variable to a file name explicitly
as opposed to in an environment variable with fallback code but that
may only be me. Setting the history file name directly in dmenu_run is
not any harder than setting an environment variable and checking for
default location would also not be needed then.


Received on Thu Dec 03 2015 - 12:35:01 CET

This archive was generated by hypermail 2.3.0 : Thu Dec 03 2015 - 12:36:12 CET