New Readline options:

- colored-stats: if visible-stats is true, color them using LS_COLORS
- skip-completed-text: when completing, don't duplicate text after cursor.
++ example: if you have type: '$ sh' and then do completion '$ /bin/b[TAB]sh'
++ it will end up '$ /bin/bash' when this setting is On, '$ /bin/bashsh' when this setting is Off
- restructure widgets in Readline group
- update german translation
parent 9e2ffc7d
......@@ -36,6 +36,15 @@ Overview of changes in v9.1 "Dial T for TNT"
* made TreeViewColumn headers translatable
=== Readline ===
* New Readline options:
- colored-stats: if visible-stats is true, color them using LS_COLORS
- skip-completed-text: when completing, don't duplicate text after cursor.
example: if you have type: '$ sh' and then do completion
'$ /bin/b[TAB]sh' it will end up '$ /bin/bash' when this
setting is On, '$ /bin/bashsh' when this setting is Off
=== Vim ===
* New color schemes provided:
......
ini_version = 14
ini_version = 15
[Style]
use_bashstyle = False
......@@ -84,6 +84,8 @@ visible_stats = False
scroll_horizontal = False
mark_modified = False
show_editmode = False
colored_stats = False
skip_completed_text = False
[Shopt]
autocd = False
......
This diff is collapsed.
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: BashStyle-NG\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-09-07 21:18+0200\n"
"POT-Creation-Date: 2015-09-08 19:33+0200\n"
"PO-Revision-Date: 2015-09-05 20:57+0200\n"
"Last-Translator: Christopher Roy Bratusek <nano@jpberlin.de>\n"
"Language-Team: German (Germany) (http://www.transifex.com/projects/p/bs-ng/"
......@@ -138,12 +138,13 @@ msgstr "farbiges ls"
#: rc/settings/nano-rc:58 rc/settings/nano-rc:66 rc/settings/nano-rc:74
#: rc/settings/nano-rc:82 rc/settings/nano-rc:90 rc/settings/nano-rc:98
#: rc/settings/nano-rc:106 rc/settings/nano-rc:114 rc/settings/nano-rc:125
#: rc/settings/nano-rc:140 rc/settings/options-rc:56 rc/settings/readline-rc:30
#: rc/settings/readline-rc:35 rc/settings/readline-rc:43
#: rc/settings/readline-rc:51 rc/settings/readline-rc:59
#: rc/settings/readline-rc:75 rc/settings/readline-rc:83
#: rc/settings/readline-rc:91 rc/settings/readline-rc:99
#: rc/settings/readline-rc:107 rc/settings/readline-rc:115
#: rc/settings/nano-rc:140 rc/settings/options-rc:56 rc/settings/readline-rc:32
#: rc/settings/readline-rc:37 rc/settings/readline-rc:45
#: rc/settings/readline-rc:53 rc/settings/readline-rc:61
#: rc/settings/readline-rc:69 rc/settings/readline-rc:77
#: rc/settings/readline-rc:85 rc/settings/readline-rc:93
#: rc/settings/readline-rc:101 rc/settings/readline-rc:109
#: rc/settings/readline-rc:117 rc/settings/readline-rc:125
#: rc/settings/shopt-rc:13 rc/settings/shopt-rc:20 rc/settings/shopt-rc:27
#: rc/settings/shopt-rc:34 rc/settings/shopt-rc:41 rc/settings/shopt-rc:48
#: rc/settings/shopt-rc:55 rc/settings/shopt-rc:62 rc/settings/shopt-rc:72
......@@ -166,12 +167,13 @@ msgstr "An"
#: rc/settings/nano-rc:69 rc/settings/nano-rc:77 rc/settings/nano-rc:85
#: rc/settings/nano-rc:93 rc/settings/nano-rc:101 rc/settings/nano-rc:109
#: rc/settings/nano-rc:117 rc/settings/nano-rc:128 rc/settings/nano-rc:144
#: rc/settings/options-rc:59 rc/settings/readline-rc:27
#: rc/settings/readline-rc:38 rc/settings/readline-rc:46
#: rc/settings/readline-rc:54 rc/settings/readline-rc:62
#: rc/settings/readline-rc:78 rc/settings/readline-rc:86
#: rc/settings/readline-rc:94 rc/settings/readline-rc:102
#: rc/settings/readline-rc:110 rc/settings/readline-rc:118
#: rc/settings/options-rc:59 rc/settings/readline-rc:29
#: rc/settings/readline-rc:40 rc/settings/readline-rc:48
#: rc/settings/readline-rc:56 rc/settings/readline-rc:64
#: rc/settings/readline-rc:72 rc/settings/readline-rc:80
#: rc/settings/readline-rc:88 rc/settings/readline-rc:96
#: rc/settings/readline-rc:104 rc/settings/readline-rc:112
#: rc/settings/readline-rc:120 rc/settings/readline-rc:128
#: rc/settings/shopt-rc:15 rc/settings/shopt-rc:22 rc/settings/shopt-rc:29
#: rc/settings/shopt-rc:36 rc/settings/shopt-rc:43 rc/settings/shopt-rc:50
#: rc/settings/shopt-rc:57 rc/settings/shopt-rc:64 rc/settings/shopt-rc:74
......@@ -231,20 +233,22 @@ msgid "GIT aliases"
msgstr "GIT Aliase"
#: rc/settings/keybindings-rc:23 rc/settings/keybindings-rc:27
#: rc/settings/keybindings-rc:31 rc/settings/readline-rc:16
#: rc/settings/readline-rc:27 rc/settings/readline-rc:30
#: rc/settings/readline-rc:35 rc/settings/readline-rc:38
#: rc/settings/readline-rc:43 rc/settings/readline-rc:46
#: rc/settings/readline-rc:51 rc/settings/readline-rc:54
#: rc/settings/readline-rc:59 rc/settings/readline-rc:62
#: rc/settings/readline-rc:67 rc/settings/readline-rc:70
#: rc/settings/readline-rc:75 rc/settings/readline-rc:78
#: rc/settings/readline-rc:83 rc/settings/readline-rc:86
#: rc/settings/readline-rc:91 rc/settings/readline-rc:94
#: rc/settings/readline-rc:99 rc/settings/readline-rc:102
#: rc/settings/readline-rc:107 rc/settings/readline-rc:110
#: rc/settings/readline-rc:115 rc/settings/readline-rc:118
#: rc/settings/readline-rc:122
#: rc/settings/keybindings-rc:31 rc/settings/readline-rc:18
#: rc/settings/readline-rc:21 rc/settings/readline-rc:25
#: rc/settings/readline-rc:29 rc/settings/readline-rc:32
#: rc/settings/readline-rc:37 rc/settings/readline-rc:40
#: rc/settings/readline-rc:45 rc/settings/readline-rc:48
#: rc/settings/readline-rc:53 rc/settings/readline-rc:56
#: rc/settings/readline-rc:61 rc/settings/readline-rc:64
#: rc/settings/readline-rc:69 rc/settings/readline-rc:72
#: rc/settings/readline-rc:77 rc/settings/readline-rc:80
#: rc/settings/readline-rc:85 rc/settings/readline-rc:88
#: rc/settings/readline-rc:93 rc/settings/readline-rc:96
#: rc/settings/readline-rc:101 rc/settings/readline-rc:104
#: rc/settings/readline-rc:109 rc/settings/readline-rc:112
#: rc/settings/readline-rc:117 rc/settings/readline-rc:120
#: rc/settings/readline-rc:125 rc/settings/readline-rc:128
#: rc/settings/readline-rc:132
msgid "ReadlineCFG Setting:"
msgstr "ReadlineCFG Setze:"
......@@ -426,63 +430,72 @@ msgstr "Farbiges grep"
msgid "ReadlineCFG"
msgstr "ReadlineCFG"
#: rc/settings/readline-rc:16
#: rc/settings/readline-rc:18
msgid "Editing-Mode Emacs"
msgstr "Editier-Modus Emacs"
#: rc/settings/readline-rc:21
msgid "Editing-Mode Vi"
msgstr "Editier-Modus Vi"
#: rc/settings/readline-rc:25
msgid "Bellstyle"
msgstr "Glockenstil"
#: rc/settings/readline-rc:27 rc/settings/readline-rc:30
#: rc/settings/readline-rc:29 rc/settings/readline-rc:32
msgid "Disable-Completion"
msgstr "Disable-Completion"
#: rc/settings/readline-rc:35 rc/settings/readline-rc:38
#: rc/settings/readline-rc:37 rc/settings/readline-rc:40
msgid "Horizontal-Scroll-Mode"
msgstr "Horizontal-Scroll-Mode"
#: rc/settings/readline-rc:43 rc/settings/readline-rc:46
#: rc/settings/readline-rc:45 rc/settings/readline-rc:48
msgid "Show-All-If-Ambiguous"
msgstr "Show-All-If-Ambiguous"
#: rc/settings/readline-rc:51 rc/settings/readline-rc:54
#: rc/settings/readline-rc:53 rc/settings/readline-rc:56
msgid "Match-Hidden-Files"
msgstr "Match-Hidden-Files"
#: rc/settings/readline-rc:59 rc/settings/readline-rc:62
#: rc/settings/readline-rc:61 rc/settings/readline-rc:64
msgid "Completion-Ignore-Case"
msgstr "Completion-Ignore-Case"
#: rc/settings/readline-rc:67
msgid "Editing-Mode Emacs"
msgstr "Editier-Modus Emacs"
#: rc/settings/readline-rc:70
msgid "Editing-Mode Vi"
msgstr "Editier-Modus Vi"
#: rc/settings/readline-rc:75 rc/settings/readline-rc:78
#: rc/settings/readline-rc:69 rc/settings/readline-rc:72
msgid "Visible-Stats"
msgstr "Visible-Stats"
#: rc/settings/readline-rc:83 rc/settings/readline-rc:86
#: rc/settings/readline-rc:77 rc/settings/readline-rc:80
#, fuzzy
msgid "Colored-Stats"
msgstr "farbiges ls"
#: rc/settings/readline-rc:85 rc/settings/readline-rc:88
msgid "Skip completed text"
msgstr ""
#: rc/settings/readline-rc:93 rc/settings/readline-rc:96
msgid "Print-Completions-Horizontally"
msgstr "Print-Completions-Horizontally"
#: rc/settings/readline-rc:91 rc/settings/readline-rc:94
#: rc/settings/readline-rc:101 rc/settings/readline-rc:104
msgid "Mark-Directories"
msgstr "Mark-Directories"
#: rc/settings/readline-rc:99 rc/settings/readline-rc:102
#: rc/settings/readline-rc:109 rc/settings/readline-rc:112
msgid "Mark-Symlinked-Directories"
msgstr "Mark-Symlinked-Directories"
#: rc/settings/readline-rc:107 rc/settings/readline-rc:110
#: rc/settings/readline-rc:117 rc/settings/readline-rc:120
msgid "Mark-Modified-Lines"
msgstr "Mark-Modified-Lines"
#: rc/settings/readline-rc:115 rc/settings/readline-rc:118
#: rc/settings/readline-rc:125 rc/settings/readline-rc:128
msgid "Show Editing Mode"
msgstr "Zeige Editier-Modus"
#: rc/settings/readline-rc:122
#: rc/settings/readline-rc:132
msgid "Completion-Query-Items"
msgstr "Completion-Query-Items"
......
......@@ -13,16 +13,18 @@ if [[ ! -e $HOME/.inputrc.bs-ng.* ]]; then
dbg_msg $"BashStyle-NG Loading:" $"ReadlineCFG"
export RC_FILE=${HOME}/.inputrc.bs-ng.$(date +%I-%M-%S)
dbg_msg $"ReadlineCFG Setting:" $"Bellstyle" $(ini_get bellstyle)
if [[ $(ini_get bellstyle) == audible ]]; then
rc_add "set bell-style audible"
elif [[ $(ini_get bellstyle) == visible ]]; then
rc_add "set bell-style visible"
elif [[ $(ini_get bellstyle) == none ]]; then
rc_add "set bell-style none"
if [[ $(ini_get editing_mode) == emacs ]]; then
dbg_msg $"ReadlineCFG Setting:" $"Editing-Mode Emacs"
rc_add "set editing-mode emacs"
else
dbg_msg $"ReadlineCFG Setting:" $"Editing-Mode Vi"
rc_add "set editing-mode vi"
fi
dbg_msg $"ReadlineCFG Setting:" $"Bellstyle" $(ini_get bellstyle)
rc_add "set bellstyle $(ini_get bellstyle)"
if [[ $(ini_get completion) == True ]]; then
dbg_msg $"ReadlineCFG Setting:" $"Disable-Completion" $"Off"
rc_add "set disable-completion off"
......@@ -63,14 +65,6 @@ if [[ ! -e $HOME/.inputrc.bs-ng.* ]]; then
rc_add "set completition-ignore-case off"
fi
if [[ $(ini_get editing_mode) == emacs ]]; then
dbg_msg $"ReadlineCFG Setting:" $"Editing-Mode Emacs"
rc_add "set editing-mode emacs"
else
dbg_msg $"ReadlineCFG Setting:" $"Editing-Mode Vi"
rc_add "set editing-mode vi"
fi
if [[ $(ini_get visible_stats) == True ]]; then
dbg_msg $"ReadlineCFG Setting:" $"Visible-Stats" $"On"
rc_add "set visible-stats on"
......@@ -79,6 +73,22 @@ if [[ ! -e $HOME/.inputrc.bs-ng.* ]]; then
rc_add "set visible-stats off"
fi
if [[ $(ini_get colored_stats) == True ]]; then
dbg_msg $"ReadlineCFG Setting:" $"Colored-Stats" $"On"
rc_add "set colored-stats on"
else
dbg_msg $"ReadlineCFG Setting:" $"Colored-Stats" $"Off"
rc_add "set colored-stats off"
fi
if [[ $(ini_get skip_completed_text) == True ]]; then
dbg_msg $"ReadlineCFG Setting:" $"Skip completed text" $"On"
rc_add "set skip-completed-text on"
else
dbg_msg $"ReadlineCFG Setting:" $"Skip completed text" $"Off"
rc_add "set skip-completed-text off"
fi
if [[ $(ini_get complete_horizontal) == True ]]; then
dbg_msg $"ReadlineCFG Setting:" $"Print-Completions-Horizontally" $"On"
rc_add "set print-completions-horizontally on"
......
This diff is collapsed.
......@@ -153,6 +153,8 @@ class BashStyleNG(object):
WidgetHandler.InitWidget("bellstyle", "Readline", "bellstyle", "combo", dicts.bell_styles)
WidgetHandler.InitWidget("editmode", "Readline", "editing_mode", "combo", dicts.edit_modes)
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)
######################## Shopt Stuff ###############################################
WidgetHandler.InitWidget("histappend", "Shopt", "histappend", "bool", None)
......
......@@ -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 = 14
app_ini_version = 15
class Config(object):
def InitConfig(self):
......@@ -61,10 +61,10 @@ class Config(object):
def CheckConfig(self):
try:
if self.cfo.as_int("ini_version") < app_ini_version:
print(_("CheckConfig: your ini is at version {}, but {} is available, updating.").format(self.cfo.as_int("ini_version"), app_ini_version))
print(_("CheckConfig: User ini is at version {}, but {} is available, updating.").format(self.cfo.as_int("ini_version"), app_ini_version))
self.UpdateConfig()
elif self.cfo.as_int("ini_version") > app_ini_version:
print(_("CheckConfig: your ini version is at {}, but {} is the highest known. Resetting due to error.").format(self.cfo.as_int("ini_version"), app_ini_version))
print(_("CheckConfig: User ini version is at {}, but {} is the highest known. Resetting due to error.").format(self.cfo.as_int("ini_version"), app_ini_version))
self.ResetConfig()
else:
print(_("CheckConfig: User configuration up-to-date."))
......
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