I'm thinking: shouldn't we just have the binary name? why having arguments in the sort matters?
Possibly to sort duplicates in different dirs the same (/bin/cp, /home/gustavo/bin/cp), I'd compare the normalized binary name and then the full path if the binary name are the same. On Sat, Mar 21, 2009 at 8:48 AM, Enlightenment SVN <no-re...@enlightenment.org> wrote: > Log: > normalize away spurious percent arguments in the executable > > Author: urandom > Date: 2009-03-21 04:48:45 -0700 (Sat, 21 Mar 2009) > New Revision: 39608 > > Modified: > trunk/e/src/bin/e_exehist.c > > Modified: trunk/e/src/bin/e_exehist.c > =================================================================== > --- trunk/e/src/bin/e_exehist.c 2009-03-21 09:53:13 UTC (rev 39607) > +++ trunk/e/src/bin/e_exehist.c 2009-03-21 11:48:45 UTC (rev 39608) > @@ -450,6 +450,7 @@ > { > char *base, *cp, *space = NULL; > const char *ret; > + Eina_Bool flag = EINA_FALSE; > > base = basename(exe); > if (base[0] == '.' && base[1] == '\0') > @@ -463,13 +464,23 @@ > { > if (!space) > space = cp; > + if (flag) > + flag = EINA_FALSE; > } > - else > + else if (!flag) > { > - char lower = tolower(*cp); > - if (lower != *cp) > - *cp = lower; > - space = NULL; > + > + /* usually a variable in the desktop exe field */ > + if (space && *cp == '%') > + flag = EINA_TRUE; > + else > + { > + char lower = tolower(*cp); > + space = NULL; > + > + if (lower != *cp) > + *cp = lower; > + } > } > cp++; > } > @@ -479,6 +490,7 @@ > > ret = eina_stringshare_add(base); > free(base); > + > return ret; > } > > > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > enlightenment-svn mailing list > enlightenment-...@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: barbi...@gmail.com Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel