Skip to content

Commit

Permalink
sabbrev: support inline and linewise sabbre with "ble-sabbrev -il"
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Mar 9, 2023
1 parent a6f168d commit 5620853
Show file tree
Hide file tree
Showing 8 changed files with 427 additions and 82 deletions.
8 changes: 8 additions & 0 deletions blerc.template
Expand Up @@ -119,6 +119,14 @@
#bleopt edit_magic_expand=history:sabbrev


## This option configures the detailed behavior of the widget "magic-space"
## with a colon-separated list. If the field "inline-sabbrev-no-insert" is
## specified, the insertion of "SP" is skipped when the inline sabbrev is
## performed by "magic-space".

#bleopt edit_magic_opts=


## The following option controls the position of the info pane where completion
## menu, mode names, and other information are shown. When the value "top" is
## specified, the info pane is shown just below the command line. When the
Expand Down
2 changes: 1 addition & 1 deletion contrib
1 change: 1 addition & 0 deletions docs/ChangeLog.md
Expand Up @@ -137,6 +137,7 @@
- edit: support a user command `ble append-line` (requested by mozirilla213) `#D2001` 2a524f34
- decode: accept isolated <kbd>ESC \<char\></kbd> (requested by mozirilla213) `#D2004` xxxxxxxx
- sabbrev: add widget `magic-slash` to approximate Zsh named directories (motivated by mozirilla213) `#D2008` xxxxxxxx
- sabbrev: support inline and linewise sabbre with `ble-sabbrev -il` `#D2012` xxxxxxxx

## Changes

Expand Down
7 changes: 5 additions & 2 deletions lib/core-complete-def.sh
Expand Up @@ -30,10 +30,13 @@ function ble-sabbrev {
blehook/eval-after-load complete "$ret"
}

if ! declare -p _ble_complete_sabbrev &>/dev/null; then # reload #D0875
builtin eval -- "${_ble_util_gdict_declare//NAME/_ble_complete_sabbrev}"
if ! declare -p _ble_complete_sabbrev_wordwise &>/dev/null; then # reload #D0875
builtin eval -- "${_ble_util_gdict_declare//NAME/_ble_complete_sabbrev_wordwise}"
fi

declare -p _ble_complete_sabbrev_literal &>/dev/null ||
builtin eval -- "${_ble_util_gdict_declare//NAME/_ble_complete_sabbrev_literal}"

#------------------------------------------------------------------------------
# 設定変数

Expand Down

0 comments on commit 5620853

Please sign in to comment.