add readline 7.0 feature support:

- 7.0 master switch
- colored completion prefix
- enable bracketed paste
- vi command mode string
- vi insert mode string
- emacs mode string
parent f65dc4f5
......@@ -136,6 +136,38 @@ if (( "${#bsng_inputrc[@]}" == 0 )); then
dbg_msg $"ReadlineCFG Setting:" $"Completion-Query-Items" $(ini_get query_items)
rc_add "set completion-query-items $(ini_get query_items)"
if [[ $(ini_get use_readline70) == True ]]; then
if [[ $(ini_get colored_completion_prefix) == True ]]; then
dbg_msg $"ReadlineCFG Setting:" $"Colored Completion Prefix" $"On"
rc_add "set colored-completion-prefix on"
else
dbg_msg $"ReadlineCFG Setting:" $"Colored Completion Prefix" $"Off"
rc_add "set colored-completion-prefix off"
fi
if [[ $(ini_get enable_bracketed_paste) == True ]]; then
dbg_msg $"ReadlineCFG Setting:" $"Enable Bracketed Paste" $"On"
rc_add "set enable-bracketed-paste on"
else
dbg_msg $"ReadlineCFG Setting:" $"Enable Bracketed Paste" $"Off"
rc_add "set enable-bracketed-paste off"
fi
if [[ $(ini_get show_editmode) == True ]]; then
if [[ $(ini_get editing_mode) == emacs ]]; then
dbg_msg $"ReadlineCFG Setting:" $"Emacs Mode String" $(ini_get emacs_mode_string)
rc_add "set emacs-mode-string $(ini_get emacs_mode_string)"
else
dbg_msg $"ReadlineCFG Setting:" $"Vi Commnad Mode String" $(ini_get vi_cmd_mode_string)
rc_add "set vi-cmd-mode-string $(ini_get vi_cmd_mode_string)"
dbg_msg $"ReadlineCFG Setting:" $"Vi Insert Mode String" $(ini_get vi_ins_mode_string)
rc_add "set vi-ins-mode-string $(ini_get vi_ins_mode_string)"
fi
fi
fi
rc_add "\$include ${HOME}/.inputrc.custom"
mv ${RC_FILE} ${HOME}/.inputrc
......
This diff is collapsed.
......@@ -162,6 +162,12 @@ class BashStyleNG(object):
WidgetHandler.InitWidget("show_editmode", "Readline", "show_editmode", "bool", None)
WidgetHandler.InitWidget("cstats", "Readline", "colored_stats", "bool", None)
WidgetHandler.InitWidget("skipcomptext", "Readline", "skip_completed_text", "bool", None)
WidgetHandler.InitWidget("use_readline70", "Readline", "use_readline70", "switch", None)
WidgetHandler.InitWidget("colored_completion_prefix", "Readline", "colored_completion_prefix", "bool", None)
WidgetHandler.InitWidget("enable_bracketed_paste", "Readline", "enable_bracketed_paste", "bool", None)
WidgetHandler.InitWidget("vi_cmd_string", "Readline", "vi_cmd_mode_string", "text", None)
WidgetHandler.InitWidget("vi_ins_string", "Readline", "vi_ins_mode_string", "text", None)
WidgetHandler.InitWidget("emacs_string", "Readline", "emacs_mode_string", "text", None)
######################## Shopt Stuff ###############################################
WidgetHandler.InitWidget("histappend", "Shopt", "histappend", "bool", None)
......
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