mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-22 08:08:00 +00:00
Set key binding (^space) to expand all aliases including global (#1500)
This commit is contained in:
parent
4b0ecffaca
commit
ff9b901394
@ -226,6 +226,14 @@ function prepend-sudo {
|
||||
}
|
||||
zle -N prepend-sudo
|
||||
|
||||
# Expand aliases
|
||||
function glob-alias {
|
||||
zle _expand_alias
|
||||
zle expand-word
|
||||
zle magic-space
|
||||
}
|
||||
zle -N glob-alias
|
||||
|
||||
# Reset to default key bindings.
|
||||
bindkey -d
|
||||
|
||||
@ -368,6 +376,9 @@ for keymap in 'emacs' 'viins'; do
|
||||
|
||||
# Insert 'sudo ' at the beginning of the line.
|
||||
bindkey -M "$keymap" "$key_info[Control]X$key_info[Control]S" prepend-sudo
|
||||
|
||||
# control-space expands all aliases, including global
|
||||
bindkey -M "$keymap" "$key_info[Control] " glob-alias
|
||||
done
|
||||
|
||||
# Delete key deletes character in vimcmd cmd mode instead of weird default functionality
|
||||
|
Loading…
Reference in New Issue
Block a user