@@ -58,13 +58,13 @@ The following functions relate to the init file and user configuration:
58
58
.. function :: parse_and_bind(string)
59
59
60
60
Execute the init line provided in the *string * argument. This calls
61
- :c:func: `rl_parse_and_bind ` in the underlying library.
61
+ :c:func: `! rl_parse_and_bind ` in the underlying library.
62
62
63
63
64
64
.. function :: read_init_file([filename])
65
65
66
66
Execute a readline initialization file. The default filename is the last filename
67
- used. This calls :c:func: `rl_read_init_file ` in the underlying library.
67
+ used. This calls :c:func: `! rl_read_init_file ` in the underlying library.
68
68
69
69
70
70
Line buffer
@@ -75,21 +75,21 @@ The following functions operate on the line buffer:
75
75
76
76
.. function :: get_line_buffer()
77
77
78
- Return the current contents of the line buffer (:c:data: `rl_line_buffer `
78
+ Return the current contents of the line buffer (:c:data: `! rl_line_buffer `
79
79
in the underlying library).
80
80
81
81
82
82
.. function :: insert_text(string)
83
83
84
84
Insert text into the line buffer at the cursor position. This calls
85
- :c:func: `rl_insert_text ` in the underlying library, but ignores
85
+ :c:func: `! rl_insert_text ` in the underlying library, but ignores
86
86
the return value.
87
87
88
88
89
89
.. function :: redisplay()
90
90
91
91
Change what's displayed on the screen to reflect the current contents of the
92
- line buffer. This calls :c:func: `rl_redisplay ` in the underlying library.
92
+ line buffer. This calls :c:func: `! rl_redisplay ` in the underlying library.
93
93
94
94
95
95
History file
@@ -102,21 +102,21 @@ The following functions operate on a history file:
102
102
103
103
Load a readline history file, and append it to the history list.
104
104
The default filename is :file: `~/.history `. This calls
105
- :c:func: `read_history ` in the underlying library.
105
+ :c:func: `! read_history ` in the underlying library.
106
106
107
107
108
108
.. function :: write_history_file([filename])
109
109
110
110
Save the history list to a readline history file, overwriting any
111
111
existing file. The default filename is :file: `~/.history `. This calls
112
- :c:func: `write_history ` in the underlying library.
112
+ :c:func: `! write_history ` in the underlying library.
113
113
114
114
115
115
.. function :: append_history_file(nelements[, filename])
116
116
117
117
Append the last *nelements * items of history to a file. The default filename is
118
118
:file: `~/.history `. The file must already exist. This calls
119
- :c:func: `append_history ` in the underlying library. This function
119
+ :c:func: `! append_history ` in the underlying library. This function
120
120
only exists if Python was compiled for a version of the library
121
121
that supports it.
122
122
@@ -128,7 +128,7 @@ The following functions operate on a history file:
128
128
129
129
Set or return the desired number of lines to save in the history file.
130
130
The :func: `write_history_file ` function uses this value to truncate
131
- the history file, by calling :c:func: `history_truncate_file ` in
131
+ the history file, by calling :c:func: `! history_truncate_file ` in
132
132
the underlying library. Negative values imply
133
133
unlimited history file size.
134
134
@@ -141,7 +141,7 @@ The following functions operate on a global history list:
141
141
142
142
.. function :: clear_history()
143
143
144
- Clear the current history. This calls :c:func: `clear_history ` in the
144
+ Clear the current history. This calls :c:func: `! clear_history ` in the
145
145
underlying library. The Python function only exists if Python was
146
146
compiled for a version of the library that supports it.
147
147
@@ -156,32 +156,32 @@ The following functions operate on a global history list:
156
156
.. function :: get_history_item(index)
157
157
158
158
Return the current contents of history item at *index *. The item index
159
- is one-based. This calls :c:func: `history_get ` in the underlying library.
159
+ is one-based. This calls :c:func: `! history_get ` in the underlying library.
160
160
161
161
162
162
.. function :: remove_history_item(pos)
163
163
164
164
Remove history item specified by its position from the history.
165
- The position is zero-based. This calls :c:func: `remove_history ` in
165
+ The position is zero-based. This calls :c:func: `! remove_history ` in
166
166
the underlying library.
167
167
168
168
169
169
.. function :: replace_history_item(pos, line)
170
170
171
171
Replace history item specified by its position with *line *.
172
- The position is zero-based. This calls :c:func: `replace_history_entry `
172
+ The position is zero-based. This calls :c:func: `! replace_history_entry `
173
173
in the underlying library.
174
174
175
175
176
176
.. function :: add_history(line)
177
177
178
178
Append *line * to the history buffer, as if it was the last line typed.
179
- This calls :c:func: `add_history ` in the underlying library.
179
+ This calls :c:func: `! add_history ` in the underlying library.
180
180
181
181
182
182
.. function :: set_auto_history(enabled)
183
183
184
- Enable or disable automatic calls to :c:func: `add_history ` when reading
184
+ Enable or disable automatic calls to :c:func: `! add_history ` when reading
185
185
input via readline. The *enabled * argument should be a Boolean value
186
186
that when true, enables auto history, and that when false, disables
187
187
auto history.
@@ -199,7 +199,7 @@ Startup hooks
199
199
200
200
.. function :: set_startup_hook([function])
201
201
202
- Set or remove the function invoked by the :c:data: `rl_startup_hook `
202
+ Set or remove the function invoked by the :c:data: `! rl_startup_hook `
203
203
callback of the underlying library. If *function * is specified, it will
204
204
be used as the new hook function; if omitted or ``None ``, any function
205
205
already installed is removed. The hook is called with no
@@ -208,7 +208,7 @@ Startup hooks
208
208
209
209
.. function :: set_pre_input_hook([function])
210
210
211
- Set or remove the function invoked by the :c:data: `rl_pre_input_hook `
211
+ Set or remove the function invoked by the :c:data: `! rl_pre_input_hook `
212
212
callback of the underlying library. If *function * is specified, it will
213
213
be used as the new hook function; if omitted or ``None ``, any
214
214
function already installed is removed. The hook is called
@@ -240,9 +240,9 @@ with a custom completer, a different set of word delimiters should be set.
240
240
starting with *text *.
241
241
242
242
The installed completer function is invoked by the *entry_func * callback
243
- passed to :c:func: `rl_completion_matches ` in the underlying library.
243
+ passed to :c:func: `! rl_completion_matches ` in the underlying library.
244
244
The *text * string comes from the first parameter to the
245
- :c:data: `rl_attempted_completion_function ` callback of the
245
+ :c:data: `! rl_attempted_completion_function ` callback of the
246
246
underlying library.
247
247
248
248
@@ -254,7 +254,7 @@ with a custom completer, a different set of word delimiters should be set.
254
254
.. function :: get_completion_type()
255
255
256
256
Get the type of completion being attempted. This returns the
257
- :c:data: `rl_completion_type ` variable in the underlying library as
257
+ :c:data: `! rl_completion_type ` variable in the underlying library as
258
258
an integer.
259
259
260
260
@@ -263,7 +263,7 @@ with a custom completer, a different set of word delimiters should be set.
263
263
264
264
Get the beginning or ending index of the completion scope.
265
265
These indexes are the *start * and *end * arguments passed to the
266
- :c:data: `rl_attempted_completion_function ` callback of the
266
+ :c:data: `! rl_attempted_completion_function ` callback of the
267
267
underlying library. The values may be different in the same
268
268
input editing scenario based on the underlying C readline implementation.
269
269
Ex: libedit is known to behave differently than libreadline.
@@ -274,7 +274,7 @@ with a custom completer, a different set of word delimiters should be set.
274
274
275
275
Set or get the word delimiters for completion. These determine the
276
276
start of the word to be considered for completion (the completion scope).
277
- These functions access the :c:data: `rl_completer_word_break_characters `
277
+ These functions access the :c:data: `! rl_completer_word_break_characters `
278
278
variable in the underlying library.
279
279
280
280
@@ -284,7 +284,7 @@ with a custom completer, a different set of word delimiters should be set.
284
284
specified, it will be used as the new completion display function;
285
285
if omitted or ``None ``, any completion display function already
286
286
installed is removed. This sets or clears the
287
- :c:data: `rl_completion_display_matches_hook ` callback in the
287
+ :c:data: `! rl_completion_display_matches_hook ` callback in the
288
288
underlying library. The completion display function is called as
289
289
``function(substitution, [matches], longest_match_length) `` once
290
290
each time matches need to be displayed.
0 commit comments