1
- ''' History searcher '''
2
1
# -*- coding: utf-8 -*-
3
2
#
4
3
# Copyright (c) 2009 by xt <[email protected] >
24
23
# (this script requires WeeChat 0.3.0 or newer)
25
24
#
26
25
# History:
26
+ #
27
+ # 2019-07-11, Sébastien Helleu <[email protected] >:
28
+ # version 0.5: make script compatible with Python 3
27
29
# 2019-07-11, Simmo Saan <[email protected] >
28
30
# version 0.4: fix detection of "/input search_text_here"
29
31
# 2016-02-20, Simmo Saan <[email protected] >
39
41
40
42
SCRIPT_NAME = "histsearch"
41
43
SCRIPT_AUTHOR = "xt <[email protected] >"
42
- SCRIPT_VERSION = "0.4 "
44
+ SCRIPT_VERSION = "0.5 "
43
45
SCRIPT_LICENSE = "GPL3"
44
46
SCRIPT_DESC = "Quick search in command history (think ctrl-r in bash)"
45
47
SCRIPT_COMMAND = 'histsearch'
82
84
"You can use completion key (commonly Tab and shift-Tab) to select " +
83
85
"next/previous command in list." ,
84
86
"" , "histsearch_cmd" , "" )
85
- for option , default_value in settings .iteritems ():
87
+ for option , default_value in settings .items ():
86
88
if w .config_get_plugin (option ) == "" :
87
89
w .config_set_plugin (option , default_value )
88
90
@@ -104,7 +106,7 @@ def unhook_all():
104
106
def hook_all ():
105
107
""" Hook command_run and modifier """
106
108
global hook_command_run , hooks
107
- for hook , value in hook_command_run .iteritems ():
109
+ for hook , value in hook_command_run .items ():
108
110
if hook not in hooks :
109
111
hooks [hook ] = w .hook_command_run (value [0 ], value [1 ], "" )
110
112
if "modifier" not in hooks :
0 commit comments