[PATCH] Handle program names with non-word characters (e.g. -) correctly for history

2 views
Skip to first unread message

David Leadbeater

unread,
Feb 27, 2009, 3:35:46 PM2/27/09
to wmii...@googlegroups.com
One of those little things that annoyed me, but not enough to fix it,
until now :).

---
core/wmii.lua | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/core/wmii.lua b/core/wmii.lua
index ee00e4b..e8c8a8b 100644
--- a/core/wmii.lua
+++ b/core/wmii.lua
@@ -726,7 +726,7 @@ local key_handlers = {
["Mod1-p"] = function (key)
local prog = prog_menu()
if prog then
- prog_hist:add(prog:match("(%w+)"))
+ prog_hist:add(prog:match("([^ ]+)"))
log (" executing: " .. prog)
os.execute (prog .. " &")
end
--
1.5.4.3

Dave O'Neill

unread,
Feb 28, 2009, 11:33:08 AM2/28/09
to wmii...@googlegroups.com
On Fri, Feb 27, 2009 at 08:35:46PM +0000, David Leadbeater wrote:
> One of those little things that annoyed me, but not enough to fix it,
> until now :).

Yeah, that's a headslapper. Guess nobody else has run enough commands
with a - in them from alt-p to trigger the bug.

Acked-by: Dave O'Neill <d...@dmo.ca>

--

Bart Trojanowski

unread,
Mar 2, 2009, 10:09:27 AM3/2/09
to wmii...@googlegroups.com
I've applied it, and released v0.2.6, but there were some issues in
it. Could you yous confirm that master
works for you, and I'll release a v0.2.7.

Cheers,
-Bart
--
http://www.jukie.net/~bart/sig
Reply all
Reply to author
Forward
0 new messages