Skip to content

Commit 6f3a932

Browse files
committed
histsearch.py 0.5: make script compatible with Python 3
1 parent 278ba14 commit 6f3a932

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

python/histsearch.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
''' History searcher '''
21
# -*- coding: utf-8 -*-
32
#
43
# Copyright (c) 2009 by xt <[email protected]>
@@ -24,6 +23,9 @@
2423
# (this script requires WeeChat 0.3.0 or newer)
2524
#
2625
# History:
26+
#
27+
# 2019-07-11, Sébastien Helleu <[email protected]>:
28+
# version 0.5: make script compatible with Python 3
2729
# 2019-07-11, Simmo Saan <[email protected]>
2830
# version 0.4: fix detection of "/input search_text_here"
2931
# 2016-02-20, Simmo Saan <[email protected]>
@@ -39,7 +41,7 @@
3941

4042
SCRIPT_NAME = "histsearch"
4143
SCRIPT_AUTHOR = "xt <[email protected]>"
42-
SCRIPT_VERSION = "0.4"
44+
SCRIPT_VERSION = "0.5"
4345
SCRIPT_LICENSE = "GPL3"
4446
SCRIPT_DESC = "Quick search in command history (think ctrl-r in bash)"
4547
SCRIPT_COMMAND = 'histsearch'
@@ -82,7 +84,7 @@
8284
"You can use completion key (commonly Tab and shift-Tab) to select " +
8385
"next/previous command in list.",
8486
"", "histsearch_cmd", "")
85-
for option, default_value in settings.iteritems():
87+
for option, default_value in settings.items():
8688
if w.config_get_plugin(option) == "":
8789
w.config_set_plugin(option, default_value)
8890

@@ -104,7 +106,7 @@ def unhook_all():
104106
def hook_all():
105107
""" Hook command_run and modifier """
106108
global hook_command_run, hooks
107-
for hook, value in hook_command_run.iteritems():
109+
for hook, value in hook_command_run.items():
108110
if hook not in hooks:
109111
hooks[hook] = w.hook_command_run(value[0], value[1], "")
110112
if "modifier" not in hooks:

0 commit comments

Comments
 (0)