@@ -65,13 +65,13 @@ The following functions relate to the init file and user configuration:
65
65
.. function :: parse_and_bind(string)
66
66
67
67
Execute the init line provided in the *string * argument. This calls
68
- :c:func: `rl_parse_and_bind ` in the underlying library.
68
+ :c:func: `! rl_parse_and_bind ` in the underlying library.
69
69
70
70
71
71
.. function :: read_init_file([filename])
72
72
73
73
Execute a readline initialization file. The default filename is the last filename
74
- used. This calls :c:func: `rl_read_init_file ` in the underlying library.
74
+ used. This calls :c:func: `! rl_read_init_file ` in the underlying library.
75
75
76
76
77
77
Line buffer
@@ -82,21 +82,21 @@ The following functions operate on the line buffer:
82
82
83
83
.. function :: get_line_buffer()
84
84
85
- Return the current contents of the line buffer (:c:data: `rl_line_buffer `
85
+ Return the current contents of the line buffer (:c:data: `! rl_line_buffer `
86
86
in the underlying library).
87
87
88
88
89
89
.. function :: insert_text(string)
90
90
91
91
Insert text into the line buffer at the cursor position. This calls
92
- :c:func: `rl_insert_text ` in the underlying library, but ignores
92
+ :c:func: `! rl_insert_text ` in the underlying library, but ignores
93
93
the return value.
94
94
95
95
96
96
.. function :: redisplay()
97
97
98
98
Change what's displayed on the screen to reflect the current contents of the
99
- line buffer. This calls :c:func: `rl_redisplay ` in the underlying library.
99
+ line buffer. This calls :c:func: `! rl_redisplay ` in the underlying library.
100
100
101
101
102
102
History file
@@ -109,21 +109,21 @@ The following functions operate on a history file:
109
109
110
110
Load a readline history file, and append it to the history list.
111
111
The default filename is :file: `~/.history `. This calls
112
- :c:func: `read_history ` in the underlying library.
112
+ :c:func: `! read_history ` in the underlying library.
113
113
114
114
115
115
.. function :: write_history_file([filename])
116
116
117
117
Save the history list to a readline history file, overwriting any
118
118
existing file. The default filename is :file: `~/.history `. This calls
119
- :c:func: `write_history ` in the underlying library.
119
+ :c:func: `! write_history ` in the underlying library.
120
120
121
121
122
122
.. function :: append_history_file(nelements[, filename])
123
123
124
124
Append the last *nelements * items of history to a file. The default filename is
125
125
:file: `~/.history `. The file must already exist. This calls
126
- :c:func: `append_history ` in the underlying library. This function
126
+ :c:func: `! append_history ` in the underlying library. This function
127
127
only exists if Python was compiled for a version of the library
128
128
that supports it.
129
129
@@ -135,7 +135,7 @@ The following functions operate on a history file:
135
135
136
136
Set or return the desired number of lines to save in the history file.
137
137
The :func: `write_history_file ` function uses this value to truncate
138
- the history file, by calling :c:func: `history_truncate_file ` in
138
+ the history file, by calling :c:func: `! history_truncate_file ` in
139
139
the underlying library. Negative values imply
140
140
unlimited history file size.
141
141
@@ -148,7 +148,7 @@ The following functions operate on a global history list:
148
148
149
149
.. function :: clear_history()
150
150
151
- Clear the current history. This calls :c:func: `clear_history ` in the
151
+ Clear the current history. This calls :c:func: `! clear_history ` in the
152
152
underlying library. The Python function only exists if Python was
153
153
compiled for a version of the library that supports it.
154
154
@@ -163,32 +163,32 @@ The following functions operate on a global history list:
163
163
.. function :: get_history_item(index)
164
164
165
165
Return the current contents of history item at *index *. The item index
166
- is one-based. This calls :c:func: `history_get ` in the underlying library.
166
+ is one-based. This calls :c:func: `! history_get ` in the underlying library.
167
167
168
168
169
169
.. function :: remove_history_item(pos)
170
170
171
171
Remove history item specified by its position from the history.
172
- The position is zero-based. This calls :c:func: `remove_history ` in
172
+ The position is zero-based. This calls :c:func: `! remove_history ` in
173
173
the underlying library.
174
174
175
175
176
176
.. function :: replace_history_item(pos, line)
177
177
178
178
Replace history item specified by its position with *line *.
179
- The position is zero-based. This calls :c:func: `replace_history_entry `
179
+ The position is zero-based. This calls :c:func: `! replace_history_entry `
180
180
in the underlying library.
181
181
182
182
183
183
.. function :: add_history(line)
184
184
185
185
Append *line * to the history buffer, as if it was the last line typed.
186
- This calls :c:func: `add_history ` in the underlying library.
186
+ This calls :c:func: `! add_history ` in the underlying library.
187
187
188
188
189
189
.. function :: set_auto_history(enabled)
190
190
191
- Enable or disable automatic calls to :c:func: `add_history ` when reading
191
+ Enable or disable automatic calls to :c:func: `! add_history ` when reading
192
192
input via readline. The *enabled * argument should be a Boolean value
193
193
that when true, enables auto history, and that when false, disables
194
194
auto history.
@@ -206,7 +206,7 @@ Startup hooks
206
206
207
207
.. function :: set_startup_hook([function])
208
208
209
- Set or remove the function invoked by the :c:data: `rl_startup_hook `
209
+ Set or remove the function invoked by the :c:data: `! rl_startup_hook `
210
210
callback of the underlying library. If *function * is specified, it will
211
211
be used as the new hook function; if omitted or ``None ``, any function
212
212
already installed is removed. The hook is called with no
@@ -215,7 +215,7 @@ Startup hooks
215
215
216
216
.. function :: set_pre_input_hook([function])
217
217
218
- Set or remove the function invoked by the :c:data: `rl_pre_input_hook `
218
+ Set or remove the function invoked by the :c:data: `! rl_pre_input_hook `
219
219
callback of the underlying library. If *function * is specified, it will
220
220
be used as the new hook function; if omitted or ``None ``, any
221
221
function already installed is removed. The hook is called
@@ -247,9 +247,9 @@ with a custom completer, a different set of word delimiters should be set.
247
247
starting with *text *.
248
248
249
249
The installed completer function is invoked by the *entry_func * callback
250
- passed to :c:func: `rl_completion_matches ` in the underlying library.
250
+ passed to :c:func: `! rl_completion_matches ` in the underlying library.
251
251
The *text * string comes from the first parameter to the
252
- :c:data: `rl_attempted_completion_function ` callback of the
252
+ :c:data: `! rl_attempted_completion_function ` callback of the
253
253
underlying library.
254
254
255
255
@@ -261,7 +261,7 @@ with a custom completer, a different set of word delimiters should be set.
261
261
.. function :: get_completion_type()
262
262
263
263
Get the type of completion being attempted. This returns the
264
- :c:data: `rl_completion_type ` variable in the underlying library as
264
+ :c:data: `! rl_completion_type ` variable in the underlying library as
265
265
an integer.
266
266
267
267
@@ -270,7 +270,7 @@ with a custom completer, a different set of word delimiters should be set.
270
270
271
271
Get the beginning or ending index of the completion scope.
272
272
These indexes are the *start * and *end * arguments passed to the
273
- :c:data: `rl_attempted_completion_function ` callback of the
273
+ :c:data: `! rl_attempted_completion_function ` callback of the
274
274
underlying library. The values may be different in the same
275
275
input editing scenario based on the underlying C readline implementation.
276
276
Ex: libedit is known to behave differently than libreadline.
@@ -281,7 +281,7 @@ with a custom completer, a different set of word delimiters should be set.
281
281
282
282
Set or get the word delimiters for completion. These determine the
283
283
start of the word to be considered for completion (the completion scope).
284
- These functions access the :c:data: `rl_completer_word_break_characters `
284
+ These functions access the :c:data: `! rl_completer_word_break_characters `
285
285
variable in the underlying library.
286
286
287
287
@@ -291,7 +291,7 @@ with a custom completer, a different set of word delimiters should be set.
291
291
specified, it will be used as the new completion display function;
292
292
if omitted or ``None ``, any completion display function already
293
293
installed is removed. This sets or clears the
294
- :c:data: `rl_completion_display_matches_hook ` callback in the
294
+ :c:data: `! rl_completion_display_matches_hook ` callback in the
295
295
underlying library. The completion display function is called as
296
296
``function(substitution, [matches], longest_match_length) `` once
297
297
each time matches need to be displayed.
0 commit comments