Debian Codegraph @

blerc.template

raw
1 # -*- mode: sh; mode: sh-bash -*-
2
3 ## This is a template for "~/.blerc".
4 ##
5 ## To use ble.sh in bash, please set up "~/.bashrc" as follows:
6 ##
7 ## ```bash
8 ## # bashrc
9 ##
10 ## # Please put the following line in the beginning of .bashrc
11 ## # Note: Please replace $HOME/.local/share/blesh with the path to your ble.sh
12 ## [[ $- == *i* ]] && source -- "$HOME/.local/share/blesh/ble.sh" --attach=none
13 ##
14 ## # Your bashrc contents should come between the two lines.
15 ##
16 ## # Please put the following line in the end of .bashrc
17 ## [[ ! ${BLE_VERSION-} ]] || ble-attach
18 ## ```
19 ##
20
21 ##-----------------------------------------------------------------------------
22 ## Basic settings
23
24
25 ## The following setting specifies the input encoding. Currently only "UTF-8"
26 ## and "C" is available.
27
28 #bleopt input_encoding=UTF-8
29
30
31 ## The following setting specifies the pager used by ble.sh. This is used to
32 ## show the help of commands (f1).
33
34 #bleopt pager=less
35
36 ## The following setting specifies the editor used by ble.sh. This is used for
37 ## the widget edit-and-execute (C-x C-e) and editor for a large amount of
38 ## command line texts. Possible values include, for example, "vim", "emacs
39 ## -nw" and "nano".
40
41 #bleopt editor=vim
42
43
44 ## The following settings sets the behavior of visible bells (vbell). The
45 ## option "vbell_duration" sets the time duration to show the vbell. The
46 ## option "vbell_align" controls the position of vbell with a colon-separated
47 ## fields. The fields "left", "center", and "right" specify that the vbell
48 ## should be shown up on the left, center, and right, respectively, in the
49 ## terminal display. The default is "right". The field "panel" specify that
50 ## vbell should be shown below the command line within the line editor
51 ## interface (as far as the line editor is currently active). The faces
52 ## "vbell", "vbell_erase", and "vbell_flash" specify the graphic style of the
53 ## vbell, the one after vbell is erased, and the one used to blink the vbell,
54 ## respectively.
55
56 #bleopt vbell_default_message=' Wuff, -- Wuff!! '
57 #bleopt vbell_duration=2000
58 #bleopt vbell_align=right
59 #ble-face vbell='reverse'
60 #ble-face vbell_erase='bg=252'
61 #ble-face vbell_flash='fg=green,reverse'
62
63
64 ##-----------------------------------------------------------------------------
65 ## Line editor settings
66
67
68 ## This option controls the behavior of the bell in the line editing by
69 ## colon-separated values. When "abell", "vbell", and "visual" are contained,
70 ## the audible bells, the visible bells, and the visual bells are enabled. The
71 ## audible bell sends BEL to the terminal. The visible bell shows the message
72 ## on the terminal display. The visual bell is the GNU-Screen style bell that
73 ## flashes the terminal display by turning on DECSCNM in a short moment. Old
74 ## settings "edit_vbell" and "edit_abell" should be updated to use "edit_bell".
75
76 #bleopt edit_bell=abell
77
78
79 ## The following setting turns on the delayed load of history when an non-empty
80 ## value is set.
81
82 #bleopt history_lazyload=1
83
84
85 ## The following setting turns on the delete selection mode when an non-empty
86 ## value is set. When the mode is turned on the selection is removed when a
87 ## user inserts a character.
88
89 #bleopt delete_selection_mode=1
90
91
92 ## The following settings control the indentation. "indent_offset" sets the
93 ## indent width. "indent_tabs" controls if tabs can be used for indentation or
94 ## not. If "indent_tabs" is set to 0, tabs will never be used. Otherwise
95 ## indentation is made with tabs and spaces.
96
97 #bleopt indent_offset=4
98 #bleopt indent_tabs=1
99
100
101 ## "undo_point" controls the cursor position after "undo". When "beg" and
102 ## "end" are specified, the cursor will be moved to the beginning and the end,
103 ## respectively, of the dirty section. When "first" and "last" are specified,
104 ## the cursor position will be the first and last positions, respectively, for
105 ## which the resulting line content is recorded. When "near" is specified, it
106 ## behaves like "last" for undo and "first" for redo. Otherwise, it behaves
107 ## like "beg" for vi command modes and "near" for the other modes. The default
108 ## is "auto".
109
110 #bleopt undo_point=near
111
112
113 ## The following setting controls forced layout calculations before graphical
114 ## operations. When a non-empty value is specified, the forced calculations are
115 ## enabled. When an empty string is set, the operations are switched to logical
116 ## ones.
117
118 #bleopt edit_forced_textmap=1
119
120
121 ## The following option controls the interpretation of lines when going to the
122 ## beginning or the end of the current line. When the value `logical` is
123 ## specified, the logical line is used, i.e., the beginning and the end of the
124 ## line is determined based on the newline characters in the edited text. When
125 ## the value `graphical` is specified, the graphical line is used, i.e., the
126 ## beginning and the end of the displayed line in the terminal is used.
127
128 #bleopt edit_line_type=graphical
129
130
131 ## The following option specifies the set of expansions performed by
132 ## magic-space with a colon-separated list of expansion types. "history",
133 ## "sabbrev", "alias", and "autocd" can be specified.
134
135 #bleopt edit_magic_expand=history:sabbrev
136
137
138 ## This option configures the detailed behavior of the widget "magic-space"
139 ## with a colon-separated list. If the field "inline-sabbrev-no-insert" is
140 ## specified, the insertion of "SP" is skipped when the inline sabbrev is
141 ## performed by "magic-space".
142
143 #bleopt edit_magic_opts=
144
145
146 ## This option specifies the expansions performed on accept-line by a
147 ## colon-separated list. The expansion is performed in a similar way as Bash's
148 ## history expansion. When "sabbrev", "alias", "autocd", and "history" is
149 ## specified, the respective expansions are attempted on the command line.
150 ## When "verify" is specified, if sabbrev, alias, or autocd expansions changed
151 ## the command line, the execution of the command line is canceled so the user
152 ## can examine or continue to edit the expanded line. The history expansion
153 ## can be controlled by "shopt -s histverify" in a similar manner. When
154 ## "verify-syntax" is specified and any expansions change the command string, a
155 ## syntax check is performed. The command execution is canceled when the
156 ## command string is not syntactically complete. When "history-line" is
157 ## specified, the history expansion replaces the command line instead of just
158 ## printing the expansion result. The default value of this option is empty.
159
160 #bleopt edit_magic_accept=sabbrev
161
162
163 ## The following option controls the position of the info pane where completion
164 ## menu, mode names, and other information are shown. When the value "top" is
165 ## specified, the info pane is shown just below the command line. When the
166 ## value "bottom" is specified, the info pane is shown at the bottom of the
167 ## terminal. The default is "top".
168
169 #bleopt info_display=top
170
171
172 ## The following settings controls the prompt after the cursor left the command
173 ## line. "prompt_ps1_final" contains a prompt string. "prompt_ps1_transient"
174 ## is a colon-separated list of fields "always", "same-dir" and "trim". The
175 ## prompt is replaced by "prompt_ps1_final" if it has a non-empty value.
176 ## Otherwise, the prompt is trimmed leaving the last line if
177 ## "prompt_ps1_transient" has a field "trim". Otherwise, the prompt vanishes
178 ## if "prompt_ps1_transient" has a non-empty value. When
179 ## "prompt_ps1_transient" contains a field "same-dir", the setting of
180 ## "prompt_ps1_transient" is effective only when the current working directory
181 ## did not change since the last command line.
182
183 #bleopt prompt_ps1_final=
184 #bleopt prompt_ps1_transient=trim
185
186
187 ## The following settings controls the right prompt. "prompt_rps1" specifies
188 ## the contents of the right prompt in the format of PS1. When the cursor
189 ## leaves the current command line, the right prompt is replaced by
190 ## "prompt_rps1_final" if it has a non-empty value, or otherwise, the right
191 ## prompt vanishes if "prompt_rps1_transient" is set to a non-empty value,
192
193 #bleopt prompt_rps1='\w'
194 #bleopt prompt_rps1_final=
195 #bleopt prompt_rps1_transient=''
196
197
198 ## The following settings specify the content of terminal titles and status
199 ## lines. "prompt_xterm_title" specifies the terminal title which can be set
200 ## by "OSC 0 ; ... BEL". "prompt_screen_title" is effective inside terminal
201 ## multiplexers such as GNU screen and tmux and specifies the window title of
202 ## the terminal multiplexer which can be set by "ESC k ... ST".
203 ## "prompt_term_status" is only effective when terminfo entries "tsl" and "fsl"
204 ## (or termcap entries "ts" and "ds") are available, and specifies the content
205 ## of the status line which can be set by the terminfo entries. When each
206 ## setting has non-empty value, the content of corresponding title or status
207 ## line is replaced just before PS1 is shown.
208
209 #bleopt prompt_xterm_title=
210 #bleopt prompt_screen_title=
211 #bleopt prompt_term_status=
212
213
214 ## The following settings control the status line. "prompt_status_line"
215 ## specifies the content of the status line. If its value is empty, the status
216 ## line is not shown. "prompt_status_align" controls the position of the
217 ## content in the status line. The face "prompt_status_line" specifies the
218 ## default graphic style of the status line.
219
220 #bleopt prompt_status_line=
221 #bleopt prompt_status_align=left
222 #ble-face prompt_status_line='fg=231,bg=240'
223
224
225 ## "prompt_eol_mark" specifies the contents of the mark used to indicate the
226 ## command output is not ended with newlines. The value can contain ANSI escape
227 ## sequences.
228
229 #bleopt prompt_eol_mark=$'\e[94m[ble: EOF]\e[m'
230
231
232 ## "prompt_ruler" specifies the ruler between the previous command and the
233 ## prompt (like powerlevel10k
234 ## "POWERLEVEL9K_PROMPT_{ADD_NEWLINE,SHOW_RULER,RULER_*}"). When the empty
235 ## value is specified, the ruler is disabled. This is the default. When the
236 ## value "empty-line" is specified, an empty line is inserted between the
237 ## command and the prompt. When the other values are specified, the value is
238 ## interpreted as an ANSI sequences, and the result is repeated to fill a line.
239
240 #bleopt prompt_ruler= # no ruler (default)
241 #bleopt prompt_ruler=empty-line # empty line
242 #bleopt prompt_ruler=$'\e[94m-' # blue line
243
244
245 ## "prompt_command_changes_layout" specifies whether the commands called from
246 ## the blehook PRECMD or the variable PROMPT_COMMAND output texts to the
247 ## terminal and changes the layout. When a non-empty value is specified,
248 ## ble.sh resets the layout before running the hooks PRECMD and PROMPT_COMMAND
249 ## and restores the layout after running the hooks. When a empty value is
250 ## specified, ble.sh assumes that these hooks do not output texts to the
251 ## terminal and do not changes the cursor positions and skip the special
252 ## treatment.
253
254 #bleopt prompt_command_changes_layout= # PRECMD/PROMPT_COMMAND not output
255 #bleopt prompt_command_changes_layout=1 # PRECMD/PROMPT_COMMAND may output
256
257
258 ## "exec_restore_pipestatus" controls whether ble.sh restores PIPESTATUS of the
259 ## previous user command. When this option is set to a non-empty value,
260 ## PIPESTATUS is restored. This feature is turned off by default because it
261 ## adds extra execution costs. Note that the values of PIPESTATUS of the
262 ## previous command are always available with the array BLE_PIPESTATUS
263 ## regardless of this setting.
264
265 #bleopt exec_restore_pipestatus=1 # restores PIPESTATUS
266
267
268 ## "edit_marker" and "edit_marker_error" define the default styles of the
269 ## markers [ble: ...] used by ble.sh. "edit_marker" is used for the normal
270 ## notifications, and "edit_marker_error" is used for the error information.
271 ## When they are set to an empty string, those markers are disabled (unless
272 ## additional information other than the markers needs to be output after the
273 ## markers). Those default styles can be overridden by specific mark settings,
274 ## such as `exec_errexit_mark`, `exec_elapsed_mark`, and `exec_exit_mark`.
275
276 #bleopt edit_marker=$'\e[94m[ble: %s]\e[m'
277 #bleopt edit_marker_error=$'\e[91m[ble: %s]\e[m'
278
279
280 ## "exec_errexit_mark" specifies the format of the mark to show the exit status
281 ## of the command when it is non-zero. If this setting is an empty string, the
282 ## exit status will not be shown. The value can contain ANSI escape sequences.
283
284 #bleopt exec_errexit_mark=$'\e[91m[ble: exit %d]\e[m'
285
286
287 ## "exec_elapsed_mark" specifies the format of the command execution time
288 ## report. It takes two arguments: the first is the string that explains the
289 ## elapsed time, and the second is a number that represents the percentage of
290 ## CPU core usage. "exec_elapsed_enabled" specifies the condition that the
291 ## command execution time report is displayed after the command execution. The
292 ## condition is expressed by an arithmetic expression, where a non-zero result
293 ## causes displaying the report. In the arithmetic expression, variables
294 ## "real", "{usr,sys}{,_self,_child}", and "cpu" can be used. "real"
295 ## represents the elapsed time. "usr" and "sys" represent the user and system
296 ## time, respectively. The suffixes "_self" and "_child" represent the part
297 ## consumed in the main shell process and the other child processes including
298 ## subshells and external programs, respectively. "cpu" represents the
299 ## percentage of the CPU core usage in integer, which can be calculated by
300 ## "(usr+sys)*100/real". The other values are all in unit of milliseconds.
301
302 #bleopt exec_elapsed_mark=$'\e[94m[ble: elapsed %s (CPU %s%%)]\e[m'
303 #bleopt exec_elapsed_enabled='usr+sys>=10000'
304
305
306 ## "exec_exit_mark" specifies the marker printed when the bash session ends.
307 ## When an empty string is specified, the marker is disabled.
308
309 #bleopt exec_exit_mark=$'\e[94m[ble: exit]\e[m'
310
311
312 ## The following setting controls the exit when jobs are remaining. When an
313 ## empty string is set, the shell will never exit with remaining jobs through
314 ## widgets. When an non-empty value is set, the shell will exit when exit is
315 ## attempted twice consecutively.
316
317 #bleopt allow_exit_with_jobs=
318
319
320 ## The following setting controls the default cursor position after moving to
321 ## another history entry. When "preserve" is specified, ble.sh tries to
322 ## preserve the cursor position before moving the history entry. When "begin"
323 ## and "end" are specified, the cursor is placed at the beginning and end,
324 ## respectively, of the entry. When "near" is specified, when we move to an
325 ## older (newer) history entry, the cursor is placed at the end (beginning) of
326 ## the text. When "far" is specified, when we move to an older (newer) history
327 ## entry, the cursor is palced at the beginning (end) of the text. When
328 ## "beginning-of-{,graphical-,logical-}line" is specified, the cursor is placed
329 ## at the beginning of the last (first) line when we move to an older (newer)
330 ## history entry. When "end-of-{,graphical-,logical-}line" is specified, the
331 ## cursor is placed at the end of the last (first) line when we move to an
332 ## older (newer) history entry. When "preserve-{,graphical-,logical-}-column"
333 ## is specified, te cursor is placed at the same column as before moving the
334 ## history entry. When the versions without "graphical" or "logical" is used,
335 ## a logical or graphical line is used based on "bleopt edit_line_type". The
336 ## default is "end-of-line". When "auto" is specified, the behavior is "end"
337 ## by default, but it becomes similar to "near" when called by vi motion.
338
339 #bleopt history_default_point=auto
340
341
342 ## The following setting controls the history sharing. If it has non-empty
343 ## value, the history sharing is enabled. With the history sharing, the command
344 ## history is shared with the other Bash ble.sh sessions with the history
345 ## sharing turned on.
346
347 #bleopt history_share=
348
349
350 ## This option controls the target range in the command history for
351 ## "erasedups", which is performed when it is specified in "HISTCONTROL". When
352 ## this option has an empty value, the target range is the entire history as in
353 ## the plain Bash. When this option evaluates to a positive integer "count",
354 ## the target range is the last "n" entries in the command history. When this
355 ## option evaluates to a non-positive integer "offset", "offset" specifies the
356 ## beginning of the target range relative to the history count at the session
357 ## start. The end of the target range is always the end of the command
358 ## history.
359
360 #bleopt history_erasedups_limit= # entire history
361 #bleopt history_erasedups_limit=0 # only new items added in this session
362 #bleopt history_erasedups_limit=-1000 # new items and 1000 prev-session items
363 #bleopt history_erasedups_limit=1000 # last 1000 items
364
365
366 ## The following setting controls the behavior of the widget
367 ## "accept-single-line-or-newline" in the single-line editing mode. The value
368 ## is a subject of arithmetic evaluation. When it evaluates to negative
369 ## integers, the line is always accepted. When it evaluates to 0, it enters the
370 ## multiline editing mode when there is any unprocessed user inputs, or
371 ## otherwise the line is accepted. When it evaluates to a positive integer "n",
372 ## it enters the multiline editing mode when there is more than "n"unprocessed
373 ## user inputs.
374
375 #bleopt accept_line_threshold=5
376
377
378 ## The following option controls the behavior when the number of characters
379 ## exceeds the capacity specified by `line_limit_length`. The value `none`
380 ## means that the number of characters will not be checked. The value
381 ## `discard` means that the characters cannot be inserted when the number of
382 ## characters exceeds the capacity. The value `truncate` means that the
383 ## command line is truncated from its end to fit into the capacity. The value
384 ## `editor` means that the widget `edit-and-execute` will be invoked to open an
385 ## editor to edit the command line contents. When the value `editor` is
386 ## specified, `bleopt history_limit_length` is recommended to be less than or
387 ## equal to `bleopt line_limit_length`. Otherwise, the text editor may be
388 ## unexpectedly executed in navigating through the history.
389
390 #bleopt line_limit_type=none
391
392
393 ## The following option specifies the capacity of the command line in the
394 ## number of characters. The number 0 or negative numbers means the unlimited
395 ## capacity.
396
397 #bleopt line_limit_length=10000
398
399
400 ## The following option specifies the maximal number of characters which can be
401 ## appended into the history. When this option has a positive value, commands
402 ## with the length longer than the value is not appended to the history. When
403 ## this option has a non-positive value, commands are always appended to the
404 ## history regardless of their length.
405
406 #bleopt history_limit_length=10000
407
408
409 ##-----------------------------------------------------------------------------
410 ## Terminal state control
411
412
413 ## When the follwoing setting is set to a non-empty value, ble.sh saves the TTY
414 ## state at the end of the command executation and restores it before the next
415 ## command execution. This adds a slight overload of running an extra call of
416 ## stty. If this is enabled, when a command breaks the TTY state, the effect
417 ## remains in later commands.
418
419 #bleopt term_stty_restore=1
420
421
422 ## The following setting specifies the cursor type when commands are executed.
423 ## The cursor type is specified by the argument of the control function
424 ## DECSCUSR.
425
426 #bleopt term_cursor_external=0
427
428
429 ## The following settings, external and internal, specify the "modifyOtherKeys"
430 ## states [the control function SM(>4)] when commands are executed and when
431 ## ble.sh has control, respectively.
432
433 #bleopt term_modifyOtherKeys_external=auto
434 #bleopt term_modifyOtherKeys_internal=auto
435
436
437 ## The following setting controls whether the kitty-keyboard-protocol sequences
438 ## should pass-through the terminal multiplexers when the outermost terminal is
439 ## kitty. When this option has a non-empty string, the pass-through kitty
440 ## protocol sequences are enabled.
441 ##
442 ## * This is intended to be used with tmux-3.4+. This works with tmux-3.3a and
443 ## below as far as the user does not enable CapsLock or NumLock. Note that
444 ## this might cause problems of keyboard inputs after detaching from tmux;
445 ## You might lose the control of the terminal applications that do not
446 ## support extended keys outside the terminal multiplexers.
447 ##
448 ## * This will cause the same problems when used with multiple windows in GNU
449 ## screen. You will lose the control of the terminal applications without
450 ## the support for extended keys when there are more than one ble.sh session
451 ## or when there is at least one foreground ble.sh session in GNU screen.
452
453 #bleopt term_modifyOtherKeys_passthrough_kitty_protocol=1
454
455 ##-----------------------------------------------------------------------------
456 ## Rendering options
457
458
459 ## "tab_width" specifies the width of TAB on the command line. When an empty
460 ## value is specified, the width in terminfo (tput it) is used.
461
462 #bleopt tab_width=
463
464
465 ## "char_width_mode" specifies the width of East_Asian_Width=A characters.
466 ## When the value "east" is specified, the width is 2. When the value "west" is
467 ## specified, the width is 1. When the value "emacs" is specified, the width
468 ## table (depending on characters) used in Emacs is used. When the value
469 ## "musl" is specified, the table for "wcwidth" of the musl C library in 2014
470 ## is used [Note: recent versions of musl library is more conforming to Unicode
471 ## so favor "west" or "east"]. When "auto" is specified, the character width
472 ## mode is automatically selected based on interactions with the terminal.
473
474 #bleopt char_width_mode=auto
475
476
477 ## "char_width_version" specifies the Unicode version that char width
478 ## determination bases on. When "auto" is specified, ble.sh automatically
479 ## tests the behavior of the terminal on startup and try to determine the
480 ## appropriate version. Supported versions are "4.1", "5.0", "5.2", "6.0",
481 ## "6.1", "6.2", "6.3", "7.0", "8.0", "9.0", "10.0", "11.0", "12.0", "12.1",
482 ## "13.0", "14.0", "15.0", and "15.1". The default value is "auto".
483
484 #bleopt char_width_version=auto
485
486
487 ## "emoji_width" specifies the width of emoji characters. If an empty value is
488 ## specified, special treatment of emoji is disabled.
489
490 #bleopt emoji_width=2
491
492
493 ## "emoji_version" specifies the version of Unicode Emoji. Available values
494 ## are 0.6, 0.7, 1.0, 2.0, 3.0, 4.0, 5.0, 11.0, 12.0, 12.1, 13.0, 13.1, 14.0,
495 ## 15.0, and 15.1.
496
497 #bleopt emoji_version=13.1
498
499
500 ## "emoji_opts" is a colon-separated list that represents the terminal
501 ## capability for emojis. When "tpvs" and "epvs" are specified, TPVS and EPVS
502 ## (text/emoji presentation variation selectors), respectively, can be used to
503 ## change he representation of emoji characters. When "zwj" is specified, the
504 ## emoji ZWJ sequences are supported. When "ri" is specified, the flag emojis
505 ## formed by two Regional_Indicators are supported. When "unqualified" is
506 ## specified, unqualified emojis are treated as emojis as well as the qualified
507 ## emojis.
508
509 #bleopt emoji_opts=ri
510
511
512 ## This option specifies the type of the supported grapheme cluster of the
513 ## terminal. The empty string indicates that the terminal does not support the
514 ## grapheme clusters. The values "extended" and "legacy" indicate that the
515 ## terminal supports the extended and legacy grapheme clusters, respectively.
516
517 #bleopt grapheme_cluster=extended
518
519
520 ## This option controls the behavior when ble.sh receives SIGWINCH.
521 ## * When the value "redraw-safe" is specified, ble.sh redraws the new prompt
522 ## starting from the line of the current cursor position.
523 ## * When the value "redraw-prev" is specified, ble.sh tries to go to the
524 ## beginning of the current prompt and overwrite the current one. This is
525 ## similar to the behavior of GNU Readline. This possibly erase the output
526 ## of the previous command because ble.sh tries to go to the beginning of the
527 ## current prompt assuming that the number of lines in the prompt does not
528 ## change by the terminal resizing.
529 ## * When the value "redraw-here" is specified, ble.sh tries to determine the
530 ## number of lines that can be safely erased and go to the beginning of the
531 ## safe lines before the redraw. This is the default behavior. In
532 ## principle, this can also erase the previous outputs, but it would be
533 ## supposed to be rarely happen as far as the text reflowing of the terminal
534 ## behaves in a reasonable way.
535 ## * When the value "clear" is specified, the terminal content is erased and
536 ## the new prompt will be drawn at the top of the terminal. The previous
537 ## terminal contents including the command outputs will be lost.
538
539 #bleopt canvas_winch_action=redraw-here
540
541 ##-----------------------------------------------------------------------------
542 ## User input settings
543
544 ## The following setting sets the default keymap. The value "emacs" specifies
545 ## that the emacs keymap should be used. The value "vi" specifies that the vi
546 ## keymap (insert mode) should be used as the default. The value "auto"
547 ## specifies that the keymap should be automatically selected from "emacs" or
548 ## "vi" according to the current readline state "set -o emacs" or "set -o vi".
549
550 #bleopt default_keymap=auto
551
552
553 ## The following setting controls the treatment of isolated ESCs. The value
554 ## "esc" indicates that it should be treated as ESC. The value "meta"
555 ## indicates that it should be treated as Meta modifier. The value "auto"
556 ## indicates that the behavior will be switched to an appropriate side of "esc"
557 ## or "meta" depending on the current keymap.
558
559 #bleopt decode_isolated_esc=esc
560
561
562 ## The following setting specifies the byte code used to abort the currently
563 ## processed inputs. The default value 28 corresponds to "C-\".
564
565 #bleopt decode_abort_char=28
566
567
568 ## The following settings sets up the behavior for errors while user input
569 ## decoding. "error_char" is the decoding error for the current character
570 ## encoding. "error_cseq" indicates the unrecognized CSI sequences.
571 ## "error_kseq" indicates the unbound key sequences. "abell" and "vbell" turn
572 ## on/off the audible bells and visible bells on errors. If the variable is
573 ## empty the bells are turned off, or otherwise turned on. "discard" controls
574 ## if the chars/sequences will be discarded or processed in later stage. If a
575 ## non-empty value is given, chars/sequences are discarded.
576
577 #bleopt decode_error_char_abell=
578 #bleopt decode_error_char_vbell=1
579 #bleopt decode_error_char_discard=
580 #bleopt decode_error_cseq_abell=
581 #bleopt decode_error_cseq_vbell=1
582 #bleopt decode_error_cseq_discard=1
583 #bleopt decode_error_kseq_abell=1
584 #bleopt decode_error_kseq_vbell=1
585 #bleopt decode_error_kseq_discard=1
586
587
588 ## This variable sets the limit to the count of recursive calls of keyboard
589 ## macros.
590
591 #bleopt decode_macro_limit=1024
592
593
594 ## When a non-empty value is specified to this settings, the terminal's
595 ## Bracketed Paste Mode (DEC mode 2004) is enabled. This setting is
596 ## synchronized with the readline variable "enable-bracketed-paste".
597
598 #bleopt term_bracketed_paste_mode=on
599
600 ##-----------------------------------------------------------------------------
601 ## Settings for completion
602
603
604 ## The following settings turn on/off the corresponding functionalities. When
605 ## non-empty strings are set, the functionality is enabled. Otherwise, the
606 ## functionality is inactive.
607
608 #bleopt complete_auto_complete=1
609 #bleopt complete_menu_complete=1
610 #bleopt complete_menu_filter=1
611
612
613 ## If "complete_ambiguous" has non-empty values, ambiguous completion
614 ## candidates are generated for completion.
615
616 #bleopt complete_ambiguous=1
617
618
619 ## If "complete_contract_function_names" has non-empty values, the function
620 ## name candidates are grouped by prefixes of the directory-like form "*/".
621
622 #bleopt complete_contract_function_names=1
623
624
625 ## By default, ble.sh does not allow rewriting the existing text if non-unique
626 ## candidates does not contain the existing text. If this setting has
627 ## non-empty values, ble.sh rewrites the existing text.
628
629 #bleopt complete_allow_reduction=1
630
631
632 ## This option specifies the threshold to simplify the quotation type of the
633 ## inserted word. This option is evaluated as an arithmetic expression. When
634 ## this option evaluates to a negative value, the simplification of the
635 ## quotation is disabled. Otherwise, when the number of characters will be
636 ## reduced by at least the specified value, the quotation is simplified. The
637 ## default is 0, which means that the quotation is simplified unless the number
638 ## of characters increases by the simplification.
639
640 #bleopt complete_requote_threshold=0
641
642
643 ## If "complete_auto_history" has non-empty values, auto-complete searches
644 ## matching command lines from history.
645
646 #bleopt complete_auto_history=1
647
648
649 ## The following setting controls the delay of auto-complete after the last
650 ## user input. The unit is millisecond.
651
652 #bleopt complete_auto_delay=100
653
654
655 ## The face "auto_complete" can be used to specify the graphic style of the
656 ## suggestion by auto-complete. The default style is choosed just to make it
657 ## work in both the terminals with light and dark backgrounds. A better style
658 ## can be specified based on the user's preference.
659
660 #ble-face auto_complete='fg=238,bg=254' # default
661 #ble-face auto_complete='fg=231,bg=69' # blue background
662 #ble-face auto_complete='fg=240,underline,italic' # darker background
663
664
665 ## The setting "complete_auto_wordbreaks" is used as the delimiters for
666 ## identifying words for M-right (auto-complete/insert-word). The default
667 ## value is $' \t\n'. If the empty value is set, the default value is used.
668
669 #bleopt complete_auto_wordbreaks=$' \t\n/'
670
671
672 ## The setting "complete_auto_complete_opts" is a colon-separated list of
673 ## options:
674 ##
675 ## - The option "suppress-after-complete" controls whether auto-complete is
676 ## enabled after TAB completions. If "suppress-after-complete" is included,
677 ## auto-complete is enabled after TAB completions. Otherwise, auto-complete
678 ## is disabled after TAB completions.
679
680 #bleopt complete_auto_complete_opts=suppress-after-complete
681
682
683 ## The faces "menu_filter_fixed" and "menu_filter_input" can be used to specify
684 ## the graphic styles of the part of the text that is used to filter the menu
685 ## items by the menu-filter feature.
686
687 #ble-face menu_filter_fixed='bold'
688 #ble-face menu_filter_input='fg=16,bg=229'
689
690
691 ## The setting "complete_auto_menu" controls the delay of "auto-menu". When a
692 ## non-empty string is set, auto-menu is enabled. The string is evaluated as
693 ## an arithmetic expression to give the delay in milliseconds. ble.sh will
694 ## automatically show the menu of completions after the idle time (for which
695 ## user input does not arrive) reaches the delay.
696
697 #bleopt complete_auto_menu=500
698
699
700 ## When there are user inputs while generating completion candidates, the
701 ## candidates generation will be canceled to process the user inputs. The
702 ## following setting controls the interval of checking user inputs while
703 ## generating completion candidates.
704
705 #bleopt complete_polling_cycle=50
706
707
708 ## A hint on the maximum acceptable size of any data structure generated during
709 ## the completion process, beyond which the completion may be prematurely
710 ## aborted to avoid excessive processing time. "complete_limit" is used for
711 ## TAB completion. When its value is empty, the size checks are disabled.
712 ## "complete_limit_auto" is used for auto-completion. When its value is empty,
713 ## the setting "complete_limit" is used instead. "complete_limit_auto_menu" is
714 ## used for auto-menu.
715
716 #bleopt complete_limit=500
717 #bleopt complete_limit_auto=200
718 #bleopt complete_limit_auto_menu=100
719
720
721 ## The following setting controls the timeout for the pathname expansions
722 ## performed in auto-complete. When the word contains a glob pattern that
723 ## takes a long time to evaluate the pathname expansion, auto-complete based on
724 ## the filename is canceled based on the timeout setting. The value specifies
725 ## the timeout duration in milliseconds. When the value is empty, the
726 ## timeout is disabled.
727
728 #bleopt complete_timeout_auto=5000
729
730
731 ## The following setting controls the timeout for the pathname expansions to
732 ## prepare COMP_WORDS and COMP_LINE for progcomp. When the word contains a
733 ## glob pattern that takes a long time to evaluate, the pathname expansion is
734 ## canceled, and a noglob expansion is used to construct COMP_WORDS and
735 ## COMP_LINE. The value specifies ## the timeout duration in milliseconds.
736 ## When the value is empty, the timeout is disabled.
737
738 #bleopt complete_timeout_compvar=200
739
740
741 ## The following setting specifies the style of the menu to show completion
742 ## candidates. The value "dense" and "dense-nowrap" shows candidates separated
743 ## by spaces. "dense-nowrap" is different from "dense" in the behavior that it
744 ## inserts a new line before the candidates that does not fit into the
745 ## remaining part of the current line. The value "align" and "align-nowrap"
746 ## aligns the candidates. The value "linewise" shows a candidate per line. The
747 ## value "desc" and "desc-text" shows a candidate per line with description for
748 ## each. "desc-text" is different from "desc" in the behavior that it does not
749 ## interprets ANSI escape sequences in the descriptions.
750
751 #bleopt complete_menu_style=align-nowrap
752
753
754 ## When a non-empty value is specified to this setting, the matching text on
755 ## the right of the cursor is removed on the insertion of the completion. This
756 ## setting is synchronized with the readline variable "skip-completed-text".
757
758 #bleopt complete_skip_matched=on
759
760
761 ## The following setting controls the detailed behavior of menu-complete with a
762 ## colon-separated list of options. When the option "insert-selection" is
763 ## specified, the currently selected menu item is temporarily inserted in the
764 ## command line. When "hidden" is specified, "insert-selection" is enabled,
765 ## and additionally, the completion menu is hidden by default. The default is
766 ## "insert-selection".
767
768 #bleopt complete_menu_complete_opts=insert-selection
769
770
771 ## When a non-empty value is specified to this setting, the highlighting of the
772 ## menu items is enabled. This setting is synchronized with the readline
773 ## variable "colored-stats".
774
775 #bleopt complete_menu_color=on
776
777
778 ## When a non-empty value is specified to this setting, the part of the menu
779 ## items matching with the already input text is highlighted. This setting is
780 ## synchronized with the readline variable "colored-completion-prefix".
781
782 #bleopt complete_menu_color_match=on
783
784
785 ## The following settings specify the maximal and minimal align widths for
786 ## complete_menu_style="align" and "align-nowrap".
787
788 #bleopt menu_align_min=4
789 #bleopt menu_align_max=20
790
791
792 ## The following setting specifies the maximal height of the menu. When this
793 ## value is evaluated to be a positive integer, the maximal line number of the
794 ## menu is limited to that value.
795
796 #bleopt complete_menu_maxlines=10
797
798
799 ## The following settings specify the prefix of the menu items. "menu_prefix"
800 ## specifies the default prefix for any menu-style.
801 ## "menu_{align,desc,linewise,dense}_prefix" specify the prefixes in the
802 ## respective menu-styles. The value is specified by a printf format, where
803 ## the first argument is the index of the candidate. ANSI escape sequences can
804 ## also be used. For example, the candidate index can be shown by setting the
805 ## value '%d '. The default value is empty.
806
807 #bleopt menu_align=
808 #bleopt menu_align_prefix='\e[1m%d:\e[m '
809 #bleopt menu_desc_prefix='\e[1m%d.\e[m '
810 #bleopt menu_linewise_prefix='\e[1;36m%d:\e[m '
811 #bleopt menu_dense_prefix='\e[1;32m>\e[m '
812
813
814 ## The following setting specifies the minimum column width for the multicolumn
815 ## description for `complete_menu_style=desc'. When the empty value is
816 ## specified, the multicolumn mode is disabled.
817
818 #bleopt menu_desc_multicolumn_width=65
819
820
821 ## These faces specifies additional graphic styles used to highlight completion
822 ## candidates. Face "menu_complete_match" specifies the additional style for
823 ## the candidate parts matching the filtering text. Face
824 ## "menu_complete_selected" specifies the additional style for the selected
825 ## candidate.
826
827 #ble-face menu_complete_match=bold
828 #ble-face menu_complete_selected=reverse
829
830
831 ## These faces control graphic styles used in the menu descriptions. Face
832 ## "menu_desc_default" is used as a default highlighting of the description.
833 ## Face "menu_desc_type" is used for the prefix string "(type) " to indicate
834 ## the type of the menu item. Face "menu_desc_quote" is used to quote strings
835 ## embedded in the descriptions.
836
837 #ble-face menu_desc_default=none
838 #ble-face menu_desc_type=ref:syntax_delimiter
839 #ble-face menu_desc_quote=ref:syntax_quoted
840
841
842 ## When this Readline setting is enabled, the cases of alphabets are ignored on
843 ## completion generation.
844
845 #bind 'set completion-ignore-case off'
846
847
848 ## When this Readline setting is turned on, suffixes are added to the filename
849 ## completions in the menu. The characters "@", "/" and "*" are added to
850 ## symbolic links, directories and executables, respectively.
851
852 #bind 'set visible-stats off'
853
854
855 ## When this Readline setting is turned on, the suffix "/" is inserted after
856 ## the insertion of directory names.
857
858 #bind 'set mark-directories on'
859
860
861 ## When this Readline setting is turned on, the suffix "/" is inserted after
862 ## symbolic links pointing to directories.
863
864 #bind 'set mark-symlinked-directories on'
865
866
867 ## When this Readline setting is turned on, the filenames starting with "." is
868 ## also generated as possible completions.
869
870 #bind 'set match-hidden-files on'
871
872
873 ## By default, when filenames of the form "dir/file*" is shown in the menu, the
874 ## part of the directory name "dir/" is omitted. When this Readline setting is
875 ## turned on, the directory name of filename completions are not omitted.
876
877 #bind 'set menu-complete-display-prefix off'
878
879
880 ## This option specifies a colon-separated list of glob patterns of sabbrev
881 ## names ignored in generating the sabbrev completion candidates.
882
883 #bleopt complete_source_sabbrev_ignore=
884
885
886 ## This is a colon-separated list of options. When the field
887 ## `no-empty-completion` is specified, the sabbrev completion candidates are
888 ## not generated when the word to complete is empty.
889
890 #bleopt complete_source_sabbrev_opts=no-empty-completion
891
892 ##-----------------------------------------------------------------------------
893 ## Color settings
894
895 ## The setting "term_index_colors" specifies the number of index colors used to
896 ## specify colors in the terminal. The value "auto" means that the use of
897 ## index colors are determined based on the terminfo database and the value of
898 ## TERM shell variable. Otherwise, the value is evaluated as an arithmetic
899 ## expression. When it is evaluated to 256, the index colors are assumed to be
900 ## xterm 256-color palette (16 basic + 6x6x6 color cube + 24 gray scale). When
901 ## it is evaluated to 88, the index colors are assumed to be xterm 88-color
902 ## palette (16 basic + 4x4x4 color cube + 8 gray scale). When it is evaluated
903 ## to 0, ble.sh will never use the index colors to set colors. When it is
904 ## evaluated to other integers, the value specifies the maximum available
905 ## index.
906
907 #bleopt term_index_colors=256
908
909
910 ## The setting "term_true_colors" specifies the format of 24-bit color escape
911 ## sequences supported by your terminal. The value "semicolon" indicates the
912 ## format "CSI 3 8 ; 2 ; R ; G ; B m". The value "colon" indicates the format
913 ## "CSI 3 8 : 2 : R : G : B m". The other value implies that the terminal does
914 ## not support 24-bit color sequences. In this case, ble.sh tries to output
915 ## indexed color sequences or basic color sequences with properly reduced
916 ## colors.
917
918 #bleopt term_true_colors=semicolon
919
920
921 ## The setting "filename_ls_colors" can be used to import the filename coloring
922 ## scheme by the environment variable LS_COLORS.
923
924 #bleopt filename_ls_colors="$LS_COLORS"
925
926
927 ## The following settings enable or disable the syntax highlighting. When the
928 ## setting "highlight_syntax" has a non-empty value, the syntax highlighting is
929 ## enabled. When the setting "highlight_filename" has a non-empty value, the
930 ## highlighting based on the filename and the command name is enabled during
931 ## the process of the syntax highlighting. Similarly, when the setting
932 ## "highlight_variable" has a non-empty value, the highlighting based on the
933 ## variable type is enabled. All of these settings have non-empty values by
934 ## default.
935
936 #bleopt highlight_syntax=
937 #bleopt highlight_filename=
938 #bleopt highlight_variable=
939
940
941 ## The following settings control the timeout and user-input cancellation of
942 ## the pathname expansions performed in the syntax highlighting. When the word
943 ## contains a glob pattern that takes a long time to evaluate the pathname
944 ## expansion, the syntax highlighting based on the filename is canceled based
945 ## on the timeouts specified by these settings. "highlight_timeout_sync" /
946 ## "highlight_timeout_async" specify the timeout durations in milliseconds to
947 ## be used for the foreground / background syntax highlighting, respectively.
948 ## When the timeout occurred in the foreground, the syntax highlighting will be
949 ## deferred to the background syntax highlighting. When the timeout occurred
950 ## in the background, the syntax highlighting for the filename is canceled.
951 ## When the value is empty, the corresponding timeout is disabled.
952 ## "syntax_eval_polling_interval" specifies the maximal interval between the
953 ## user-input checking.
954
955 #bleopt highlight_timeout_sync=500
956 #bleopt highlight_timeout_async=5000
957 #bleopt syntax_eval_polling_interval=50
958
959
960 ## The following setting limits the number of expanded words to process in
961 ## highlighting a single grammatical word. When this setting is set to an
962 ## empty string, the number of expanded words to process is unlimited.
963
964 #bleopt highlight_eval_word_limit=200
965
966
967 ## If set to a non-empty value, the setting "color_scheme" specifies a preset
968 ## graphic styles for basic faces. The supported schemes are found in the
969 ## subdirectory "contrib/scheme". The default value is "default".
970
971 #bleopt color_scheme=base16
972
973
974 ## The following settings specify graphic styles of corresponding faces. Faces
975 ## used for specific features are described in the respective sections.
976
977 #ble-face -s region fg=231,bg=60
978 #ble-face -s region_insert fg=27,bg=254
979 #ble-face -s region_match fg=231,bg=55
980 #ble-face -s region_target fg=black,bg=153
981 #ble-face -s disabled fg=242
982 #ble-face -s overwrite_mode fg=black,bg=51
983
984 #ble-face -s syntax_default none
985 #ble-face -s syntax_command fg=brown
986 #ble-face -s syntax_quoted fg=green
987 #ble-face -s syntax_quotation fg=green,bold
988 #ble-face -s syntax_escape fg=magenta
989 #ble-face -s syntax_expr fg=63
990 #ble-face -s syntax_error bg=203,fg=231
991 #ble-face -s syntax_varname fg=202
992 #ble-face -s syntax_delimiter bold
993 #ble-face -s syntax_param_expansion fg=133
994 #ble-face -s syntax_history_expansion bg=94,fg=231
995 #ble-face -s syntax_function_name fg=99,bold
996 #ble-face -s syntax_comment fg=gray
997 #ble-face -s syntax_glob fg=198,bold
998 #ble-face -s syntax_brace fg=37,bold
999 #ble-face -s syntax_tilde fg=63,bold
1000 #ble-face -s syntax_document fg=100
1001 #ble-face -s syntax_document_begin fg=100,bold
1002 #ble-face -s command_builtin_dot fg=red,bold
1003 #ble-face -s command_builtin fg=red
1004 #ble-face -s command_alias fg=teal
1005 #ble-face -s command_function fg=99 # fg=133
1006 #ble-face -s command_file fg=green
1007 #ble-face -s command_keyword fg=blue
1008 #ble-face -s command_jobs fg=red,bold
1009 #ble-face -s command_directory fg=63,underline
1010 #ble-face -s command_suffix fg=231,bg=28
1011 #ble-face -s command_suffix_new fg=231,bg=124
1012 #ble-face -s argument_option fg=teal
1013 #ble-face -s argument_option fg=black,bg=225
1014 #ble-face -s filename_directory underline,fg=33
1015 #ble-face -s filename_directory_sticky underline,fg=231,bg=26
1016 #ble-face -s filename_link underline,fg=teal
1017 #ble-face -s filename_orphan underline,fg=16,bg=224
1018 #ble-face -s filename_setuid underline,fg=black,bg=220
1019 #ble-face -s filename_setgid underline,fg=black,bg=191
1020 #ble-face -s filename_executable underline,fg=green
1021 #ble-face -s filename_other underline
1022 #ble-face -s filename_socket underline,fg=cyan,bg=black
1023 #ble-face -s filename_pipe underline,fg=lime,bg=black
1024 #ble-face -s filename_character underline,fg=231,bg=black
1025 #ble-face -s filename_block underline,fg=yellow,bg=black
1026 #ble-face -s filename_warning underline,fg=red
1027 #ble-face -s filename_url underline,fg=blue
1028 #ble-face -s filename_ls_colors underline
1029 #ble-face -s varname_array fg=orange,bold
1030 #ble-face -s varname_empty fg=31
1031 #ble-face -s varname_export fg=200,bold
1032 #ble-face -s varname_expr fg=99,bold
1033 #ble-face -s varname_hash fg=70,bold
1034 #ble-face -s varname_new fg=34
1035 #ble-face -s varname_number fg=64
1036 #ble-face -s varname_readonly fg=200
1037 #ble-face -s varname_transform fg=29,bold
1038 #ble-face -s varname_unset fg=245
1039
1040 #ble-face -s cmdinfo_cd_cdpath fg=26,bg=155
1041
1042 ##-----------------------------------------------------------------------------
1043 ## Keybindings
1044
1045
1046 ## The default mapping of <SP> in ble.sh is magic-space which performs history
1047 ## and sabbrev expansion before inserting a space. If you want to insert just
1048 ## a space without expansions as Bash's default, use the following setting:
1049
1050 #ble-bind -f 'SP' 'self-insert'
1051
1052
1053 ## The default mapping of `/' (<slash>) in ble.sh is magic-slash which performs
1054 ## sabbrev expansions of the name ` ~*'. If you want to insert just a slash
1055 ## without expansions as Bash's default, use the following setting:
1056
1057 #ble-bind -f '/' 'self-insert'
1058
1059
1060 ## If you want to search the already input string using <up> and <down> keys,
1061 ## use the following setting:
1062
1063 #ble-bind -f up 'history-search-backward'
1064 #ble-bind -f down 'history-search-forward'
1065
1066
1067 ## If you want to immediately run the matched command by RET, you can specify
1068 ## the option "immediate-accept" to nsearch widgets:
1069
1070 #ble-bind -f up 'history-search-backward immediate-accept'
1071 #ble-bind -f down 'history-search-forward immediate-accept'
1072
1073
1074 ## If you want to kill/copy words including the spaces preceding them, you can
1075 ## use the following keybindings:
1076
1077 #ble-bind -f C-w 'kill-region-or kill-uword'
1078 #ble-bind -f M-w 'copy-region-or copy-uword'
1079
1080
1081 ## The following keybindings can be used to execute the command by RET even in
1082 ## the multiline mode.
1083
1084 # # For emacs editing mode
1085 # ble-bind -m emacs -f 'C-m' 'accept-line'
1086 # ble-bind -m emacs -f 'RET' 'accept-line'
1087
1088 # # For vim editing mode
1089 # ble-bind -m vi_imap -f 'C-m' 'accept-line'
1090 # ble-bind -m vi_imap -f 'RET' 'accept-line'
1091 # ble-bind -m vi_nmap -f 'C-m' 'accept-line'
1092 # ble-bind -m vi_nmap -f 'RET' 'accept-line'
1093
1094
1095 ## If you want to accept the suggestion by auto-complete using TAB, please use
1096 ## the following keybindings. By default, <right> key can be used to accept
1097 ## the suggestion, and <TAB> is assigned to the normal TAB completion which is
1098 ## independent of auto-complete.
1099
1100 # ble-bind -m auto_complete -f C-i auto_complete/insert
1101 # ble-bind -m auto_complete -f TAB auto_complete/insert
1102
1103 ##-----------------------------------------------------------------------------
1104 ## Settings for Emacs mode
1105
1106 function blerc/emacs-load-hook {
1107 #----------------------------------------------------------------------------
1108 # Settings for the mode indicator
1109
1110 ## The following option specifies the content of the mode indicator shown in
1111 ## the info line as a prompt sequence.
1112
1113 #bleopt prompt_emacs_mode_indicator='\q{keymap:emacs/mode-indicator}'
1114
1115
1116 ## The following option specifies the multiline mode name used in the prompt
1117 ## sequence \q{keymap:emacs/mode-indicator} in the multiline editing mode.
1118
1119 # default
1120 #bleopt keymap_emacs_mode_string_multiline=$'\e[1m-- MULTILINE --\e[m'
1121 # do not show the mode name
1122 #bleopt keymap_emacs_mode_string_multiline=
1123
1124 #----------------------------------------------------------------------------
1125 # Keybindings
1126
1127 ## The default mapping of RET and C-m inserts newline with multiline commands
1128 ## or incomplete commands. With the following setting, RET and C-m always
1129 ## causes the execution of the command even in the multiline mode or when the
1130 ## command is not syntactically completed.
1131
1132 #ble-bind -f 'C-m' accept-line
1133 #ble-bind -f 'RET' accept-line
1134
1135
1136 ## With the following settings, M-backspace (whose actual key sequence
1137 ## depends on your terminal) will kill the backward word as in the default
1138 ## readline.
1139
1140 #ble-bind -f 'M-C-?' kill-backward-cword
1141 #ble-bind -f 'M-DEL' kill-backward-cword
1142 #ble-bind -f 'M-C-h' kill-backward-cword
1143 #ble-bind -f 'M-BS' kill-backward-cword
1144
1145 return 0
1146 }
1147 blehook/eval-after-load keymap_emacs blerc/emacs-load-hook
1148
1149 ##-----------------------------------------------------------------------------
1150 ## Settings for Vim mode
1151
1152 function blerc/vim-load-hook {
1153 ((_ble_bash>=40300)) && builtin bind 'set keyseq-timeout 1'
1154
1155 #----------------------------------------------------------------------------
1156 # Settings for the mode indicator
1157
1158 ## The following option specifies the content of the mode indicator shown in
1159 ## the info line as a prompt sequence.
1160
1161 #bleopt prompt_vi_mode_indicator='\q{keymap:vi/mode-indicator}'
1162
1163
1164 ## The following option controls whether the prompt sequence
1165 ## \q{keymap:vi/mode-indicator} is activated. When this option has a
1166 ## non-empty value, \q{keymap:vi/mode-indicator} is expanded to the mode
1167 ## indicator. Otherwise, \q{keymap:vi/mode-indicator} is expanded to the
1168 ## empty string.
1169
1170 #bleopt keymap_vi_mode_show=1
1171
1172
1173 ## The following options specify the name of modes in
1174 ## \q{keymap:vi/mode-indicator}.
1175
1176 #bleopt keymap_vi_mode_name_insert=INSERT
1177 #bleopt keymap_vi_mode_name_replace=REPLACE
1178 #bleopt keymap_vi_mode_name_vreplace=VREPLACE
1179 #bleopt keymap_vi_mode_name_visual=VISUAL
1180 #bleopt keymap_vi_mode_name_select=SELECT
1181 #bleopt keymap_vi_mode_name_linewise=LINE
1182 #bleopt keymap_vi_mode_name_blockwise=BLOCK
1183
1184
1185 ## This option specifies the result of \q{keymap:vi/mode-indicator} in the
1186 ## normal mode. For example, if you want to show an explicit name of the
1187 ## normal mode like in other modes, please use the following setting:
1188
1189 #bleopt keymap_vi_mode_string_nmap:=$'\e[1m-- NORMAL --\e[m'
1190
1191
1192 ## This option specifies that all the prompts should be recalculated on the
1193 ## mode change. When this option has a non-empty value, the prompt will be
1194 ## recalculated.
1195
1196 #bleopt keymap_vi_mode_update_prompt=
1197
1198 #----------------------------------------------------------------------------
1199 # Keybindings
1200
1201 ## The following setting sets up the keymap settings with Meta modifiers.
1202 ## With this setting, M-RET can be used to insert a newline in the
1203 ## commandline.
1204
1205 #ble-decode/keymap:vi_imap/define-meta-bindings
1206
1207 ## In this case, C-RET can be optionally configured so that it forcibly
1208 ## executes the command.
1209
1210 #ble-bind -m vi_imap -f 'C-RET' 'accept-line'
1211
1212 ## The default mapping of <M-backspace> (whose actual key sequence depends on
1213 ## your terminal) copies the previous shell word in the kill ring. Instead,
1214 ## the following settings will kill the backward word as in the default
1215 ## readline.
1216
1217 #ble-bind -m vi_imap -f 'M-C-?' kill-backward-cword
1218 #ble-bind -m vi_imap -f 'M-DEL' kill-backward-cword
1219 #ble-bind -m vi_imap -f 'M-C-h' kill-backward-cword
1220 #ble-bind -m vi_imap -f 'M-BS' kill-backward-cword
1221
1222
1223 ## The default mapping of RET and C-m in the insert mode inserts newline with
1224 ## multiline commands or incomplete commands. They moves the cursor position
1225 ## to the next line in the normal mode. Instead, with the following setting,
1226 ## RET and C-m always causes the execution of the command even in the
1227 ## multiline mode or when the command is not syntactically completed.
1228
1229 #ble-bind -m vi_imap -f 'C-m' accept-line
1230 #ble-bind -m vi_imap -f 'RET' accept-line
1231 #ble-bind -m vi_nmap -f 'C-m' accept-line
1232 #ble-bind -m vi_nmap -f 'RET' accept-line
1233
1234
1235 ## The default mapping of C-o is vi_imap/single-command-mode. If you want to
1236 ## execute the current command line and load the next history entry with
1237 ## <C-o>, use the following setting:
1238
1239 #ble-bind -m vi_imap -f 'C-o' 'accept-and-next'
1240
1241
1242 ## The default mapping of C-k is kill-forward-line. If you want to input
1243 ## digraphs with <C-k>{char1}{char2}, use the following setting:
1244
1245 #ble-bind -m vi_imap -f 'C-k' 'vi_imap/insert-digraph'
1246
1247
1248 ## The default mapping of C-c is vi_imap/normal-mode-without-insert-leave
1249 ## (imap), vi-command/cancel (nmap). If you instead want to discard the
1250 ## current line and go to the next line, you can bind C-c to 'discard-line':
1251
1252 #ble-bind -m vi_imap -f 'C-c' discard-line
1253 #ble-bind -m vi_nmap -f 'C-c' discard-line
1254
1255
1256 ## The default mapping of 'g g' and G moves the current position in the
1257 ## command history. If you would like to move the cursor position in the
1258 ## current command entry, you can overwrite the bindings as follows.
1259
1260 #ble-bind -m vi_nmap -f 'g g' vi-command/first-nol
1261 #ble-bind -m vi_omap -f 'g g' vi-command/first-nol
1262 #ble-bind -m vi_xmap -f 'g g' vi-command/first-nol
1263 #ble-bind -m vi_nmap -f 'G' vi-command/last-line
1264 #ble-bind -m vi_omap -f 'G' vi-command/last-line
1265 #ble-bind -m vi_xmap -f 'G' vi-command/last-line
1266
1267
1268 ## The default mapping of 'C-r' in the normal mode is "vi_nmap/redo". If you
1269 ## want to use the incremental search mode from Emacs in the Vim mode (as in
1270 ## Readline), please use the following keybinding.
1271
1272 #ble-bind -m vi_nmap -f 'C-r' history-isearch-backward
1273
1274 #----------------------------------------------------------------------------
1275 # Cursor shapes and other terminal settings
1276
1277 ## Cursor settings
1278
1279 #ble-bind -m vi_nmap --cursor 2
1280 #ble-bind -m vi_imap --cursor 5
1281 #ble-bind -m vi_omap --cursor 4
1282 #ble-bind -m vi_xmap --cursor 2
1283 #ble-bind -m vi_smap --cursor 2
1284 #ble-bind -m vi_cmap --cursor 0
1285
1286 ## DECSCUSR setting
1287 ##
1288 ## If you don't have the entry Ss in terminfo, yet your terminal supports
1289 ## DECSCUSR, please comment out the following line to enable DECSCUSR.
1290 ##
1291 #_ble_term_Ss=$'\e[@1 q'
1292
1293 ## Control sequences that will be output on entering each mode
1294 #bleopt term_vi_nmap=
1295 #bleopt term_vi_imap=
1296 #bleopt term_vi_omap=
1297 #bleopt term_vi_xmap=
1298 #bleopt term_vi_smap=
1299 #bleopt term_vi_cmap=
1300
1301 #----------------------------------------------------------------------------
1302 # Miscellaneous settings
1303
1304 ## This option controls the frequency of recording "undo". When the value
1305 ## "more" is specified, "undo" will be recorded for various operations in
1306 ## "vi_imap".
1307
1308 #bleopt keymap_vi_imap_undo=
1309
1310
1311 ## This option controls the behavior of motion in select mode. The value is
1312 ## a list of words separated by commas. When the word "stopsel" is contained
1313 ## in this option, ble.sh exits the select mode with a motion in select mode.
1314
1315 #bleopt keymap_vi_keymodel=
1316
1317
1318 ## This option sets the upper limit of the maximal depth of recurrence of
1319
1320 ## replaying keyboard macros.
1321 #bleopt keymap_vi_macro_depth=64
1322
1323
1324 ## This option specifies the operator name when the user input "g@" in normal
1325 ## mode. The function "ble/keymap:vi/operator:$value", where "$value" is the
1326 ## value of this setting, is used as the implementation of the operator.
1327
1328 #bleopt keymap_vi_operatorfunc=
1329
1330
1331 ## When this option has a non-empty value, "/", "?", "n", "N" search the word
1332 ## on the current position. When this option has the empty value, these keys
1333 ## follows the behavior of `vim`.
1334
1335 #bleopt keymap_vi_search_match_current=
1336
1337 #----------------------------------------------------------------------------
1338 # plugins
1339
1340 ## vim-surround
1341
1342 #ble-import vim-surround
1343 #bleopt vim_surround_45:=$'$( \r )'
1344 #bleopt vim_surround_61:=$'$(( \r ))'
1345
1346 ## vim-arpeggio
1347
1348 #ble-import vim-arpeggio
1349 #bleopt vim_arpeggio_timeoutlen=10
1350 #ble/lib/vim-arpeggio.sh/bind -s jk 'hello'
1351
1352 ## vim-airline
1353
1354 #ble-import vim-airline
1355 #bleopt vim_airline_theme=light
1356 #bleopt vim_airline_section_a='\e[1m\q{lib/vim-airline/mode}'
1357 #bleopt vim_airline_section_b='\q{lib/vim-airline/gitstatus}'
1358 #bleopt vim_airline_section_c='\w'
1359 #bleopt vim_airline_section_x='bash'
1360 #bleopt vim_airline_section_y='$_ble_util_locale_encoding[unix]'
1361 #bleopt vim_airline_section_z=' \q{history-percentile} \e[1m!\q{history-index}/\!\e[22m \q{position}'
1362 #bleopt vim_airline_left_sep=$'\uE0B0'
1363 #bleopt vim_airline_left_alt_sep=$'\uE0B1'
1364 #bleopt vim_airline_right_sep=$'\uE0B2'
1365 #bleopt vim_airline_right_alt_sep=$'\uE0B3'
1366 #bleopt vim_airline_symbol_branch=$'\uE0A0'
1367 #bleopt vim_airline_symbol_dirty=$'\u26A1'
1368 }
1369 blehook/eval-after-load keymap_vi blerc/vim-load-hook
1370
1371 ##-----------------------------------------------------------------------------
1372 ## Internal settings
1373
1374
1375 ## When the option "connect_tty" is set to a non-empty value, ble.sh in the
1376 ## child interactive Bash processes tries to connect to /dev/tty for its user
1377 ## interface when the initial standard streams of Bash are redirected to
1378 ## non-TTY streams. The standard streams for the user command executions are
1379 ## kept to be the original ones. This does not affect the behavior of the
1380 ## current session. If it is set to the value "inherit", ble.sh tries to
1381 ## export the TTY for the child ble.sh sessions. This might cause an issue in
1382 ## non-closing terminal window when a background process starts in the session.
1383 ## The default value is "1".
1384
1385 #bleopt connect_tty=
1386
1387
1388 ## This option sets the interval of checking new user inputs. The value is
1389 ## evaluated as an arithmetic expression. On the evaluation, a shell variable
1390 ## "ble_util_idle_elapsed" is provided for the time since the last user input
1391 ## in millisecond. This option is used for the polling for the background
1392 ## execution when there is no user inputs.
1393
1394 #bleopt idle_interval='ble_util_idle_elapsed>600000?500:(ble_util_idle_elapsed>60000?200:(ble_util_idle_elapsed>5000?100:20))'
1395
1396
1397 ## This option specifies a colon-separated list of custom search paths of "ble-import".
1398
1399 #bleopt import_path="${XDG_DATA_HOME:-$HOME/.local/share}/blesh/local"
1400
1401
1402 ## When a non-empty value is specified to this option, displays the internal
1403 ## syntax analysis information and the syntax tree. This is only effective in
1404 ## devel versions.
1405
1406 #bleopt syntax_debug=
1407
1408
1409 ## When the option "debug_xtrace" contains a non-empty value, xtrace (set -x)
1410 ## is enabled for the internal processing of ble.sh. The value is used for the
1411 ## xtrace output log filename. [ Caution: The file size of the log file can
1412 ## soon grow up to hundred megabytes or to gigabytes. ] The option
1413 ## "debug_xtrace_ps4" specifies the value of PS4 for xtrace enabled by
1414 ## "debug_xtrace".
1415
1416 #bleopt debug_xtrace=~/blesh.xtrace
1417 #bleopt debug_xtrace_ps4='+ '
1418
1419
1420 ## When the option "debug_idle" contains a non-empty value, the background
1421 ## tasks currently running are shown in the info panel.
1422
1423 #bleopt debug_idle=1
1424
1425
1426 ## [The setting "openat_base" needs to be set before ble.sh is loaded or
1427 ## specified in the source options. Therefore the value should be assigned
1428 ## directly to the shell variable "bleopt_openat_base" instead of using
1429 ## "bleopt" command.]
1430 ##
1431 ## This setting "openat_base" specifies the starting number of the file
1432 ## descriptors which ble.sh internally uses in Bash 4.0 or lower. The value of
1433 ## this setting is used as the number for the first file descriptor of internal
1434 ## use, and the next value is used for the second file descriptor, and so on.
1435 ## When you want to use the default value 30 and succeeding number 31, 32,
1436 ## etc. for other purposes, please set to this settings another value which
1437 ## does not conflict with file descriptors of other purposes.
1438
1439 # echo "usage: e.g. source out/ble.sh -o openat_base=30"
1440
1441
1442 ## This option specifies the context of the command execution. The value
1443 ## "gexec" specifies that the user command is evaluated in global contexts.
1444 ## The value "exec" (ble-0.3 and before) specified that the user command is
1445 ## evaluated in a function, but the support is removed in ble-0.4 because this
1446 ## is only remained for a debugging purpose and not tested well.
1447
1448 #bleopt internal_exec_type=gexec
1449
1450
1451 ## If this option has a non-empty value, when the execution of a shell function
1452 ## is interrupted by SIGINT, the processing of SIGINT by the DEBUG trap is
1453 ## printed to stderr. The default is empty.
1454
1455 #bleopt internal_exec_int_trace=1
1456
1457
1458 ## This option sets the message that Bash outputs when "C-d" is input by user.
1459 ## This value is used to detect that the user inputs "C-d" in Bash 3.
1460
1461 #bleopt internal_ignoreeof_trap='Use "exit" to leave the shell.'
1462
1463
1464 ## This option controls the output of stack dump when assertion is failed in
1465 ## ble.sh. When the value is evaluated to be non-zero, the stack dump is
1466 ## printed for assertion failures.
1467
1468 #bleopt internal_stackdump_enabled=0
1469
1470
1471 ## When a non-empty value is specified to this option, the standard output and
1472 ## standard error from Bash is not output to the terminal. When the value is
1473 ## empty, ble.sh tries to realize the line editing allowing Bash to output its
1474 ## own standard output and error. This setting has a flickering problem and
1475 ## only left for debugging purpose, so it is not tested. Normally a non-empty
1476 ## value should be specified so as to suppress the standard output and error
1477 ## from Bash.
1478
1479 #bleopt internal_suppress_bash_output=1
1480
1481
1482 ## This is a colon-separated list of fields to control the behavior of
1483 ## ble/debug/profiler. When the field "line" and "func" are specified,
1484 ## statistics for lines and function calls, respectively, are enabled. When
1485 ## the field "tree" is specified, function-call trees are saved. Optional
1486 ## parameter "html" can be specified to "line" and "func" separated by the
1487 ## equal sign, i.e., "line=html" and "func=html". In such a case, the results
1488 ## are also saved in the .html format.
1489
1490 #bleopt debug_profiler_opts=line:func
1491
1492
1493 ## This option specifies the threshold time in milliseconds to determine
1494 ## whether to include a command in the tree generated by "bleopt
1495 ## debug_profiler_opts=tree". The commands that took less than this time in
1496 ## execution will be skipped. The default value is 5.0 msec.
1497
1498 #bleopt debug_profiler_tree_threshold=5.0