new keybindings: backward-kill-line / list-keys

parent 11b2dbec
......@@ -120,8 +120,13 @@ Overview of changes in v9.1 "Dial T for TNT"
- if you want to re-enable this feature set menu-complete in Keybindings to TAB
with no modificator checked
* add menu-complete-backward (default: Ctrl-Tab)
* add custom rerun-root (rerun last command as root, default: Alt-r)
* new standard keybindings:
++ menu-complete-backward (default: Ctrl-Tab)
++ backward-kill-line (default: Alt-k)
* new custom keybindings:
++ rerun-root (rerun last command as root, default: Alt-r)
++ list-keys (list all bound command and their keybindings, default: Alt-p)
* made TreeViewColumn headers translatable
......
ini_version = 20
ini_version = 21
[Style]
use_bashstyle = False
......@@ -232,7 +232,7 @@ end_of_line = C:e
clear_screen = C:l
history_search_forward = ""
history_search_backward = ""
complete_path = ""
complete_path = "C:p"
alias_expand_line = ""
backward_char = "C:b"
backward_word = "e:b"
......@@ -242,7 +242,9 @@ copy_backward_word = ""
copy_forward_word = ""
forward_char = "C:f"
forward_word = "e:f"
overwrite_mode = ""
overwrite_mode = "C:o"
menu_complete = "X:TAB"
menu_complete_backward = "C:TAB"
rerun_root = "e:r"
list_keys = "e:p"
backward_kill_line = "e:k"
......@@ -17,7 +17,7 @@ export BSNG_DATA_DIR=@DATADIR@
export BSNG_RC_DIR=${BSNG_DATA_DIR}/bashstyle-ng/rc
export BSNG_VERSION=@VERSION@
export BSNG_YEAR="2007 - 2015"
INI_VERSION=20
INI_VERSION=21
source ${BSNG_RC_DIR}/internal/misc
source ${BSNG_RC_DIR}/internal/logging
......
......@@ -9,6 +9,10 @@
# #
#########################################################
function list-keybindings () {
bind -P | sed -e '/is not/d;s/can be found on/:/' | column -s : -t
}
keybindings_setter () {
if [[ "${1}" != "" ]]; then
MOD=${1/:*}
......@@ -17,6 +21,7 @@ keybindings_setter () {
case ${2} in
complete-path) ACT='"\eb`which \ef` \e\C-e"' ;;
rerun-root) ACT='"\ebsudo !!\e\C-e\C-j"' ;;
list-keys) ACT='"\eblist-keybindings\e\C-e\C-j"' ;;
*) ACT=${2} ;;
esac
......@@ -49,7 +54,8 @@ if [[ ! -e $HOME/.keybindings.bs-ng.* ]]; then
history_search_backward complete_path menu_complete alias_expand_line \
backward_char backward_word backward_delete_char delete_char \
copy_backward_word copy_forward_word forward_char forward_word \
overwrite_mode menu_complete_backward rerun_root ; do
overwrite_mode menu_complete_backward rerun_root backward_kill_line \
list_keys; do
keybindings_setter $(ini_get $key) ${key//_/-}
......
......@@ -31,7 +31,7 @@ USER_DEFAULTS_SAVE = (os.getenv('HOME') + '/.bs-ng.ini.save')
FACTORY_DEFAULTS = (DATADIR + '/bashstyle-ng/bs-ng.ini')
VENDOR_DEFAULTS = ('/etc/bs-ng_vendor.ini')
app_ini_version = 20
app_ini_version = 21
class Config(object):
def InitConfig(self):
......
......@@ -72,7 +72,9 @@ keybindings = {
"overwrite_mode",
"menu_complete",
"menu_complete_backward",
"rerun_root"
"rerun_root",
"backward_kill_line",
"list_keys"
}
class CellRendererClickablePixbuf(Gtk.CellRendererPixbuf):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment