Add default keybinding flag. Resolves #1691

This commit is contained in:
kyle tibbetts
2021-08-16 21:51:12 -04:00
committed by Dawa Ometto
parent 9c2f8dfeba
commit 9e722c5033
19 changed files with 131 additions and 25 deletions
+5 -1
View File
@@ -15,7 +15,7 @@ options = {
}
wiki_options = {
:allow_uploads => false,
:allow_editing => true,
:allow_editing => true
}
opts = OptionParser.new do |opts|
@@ -166,6 +166,10 @@ MSG
opts.on('--emoji', 'Parse and interpret emoji tags (e.g. :heart:) except when the leading colon is backslashed (e.g. \\:heart:).') do
wiki_options[:emoji] = true
end
opts.on('--default-keybinding [KEYBINDING]', Gollum::KEYBINDINGS.drop(1), 'Set the default keybinding for the editor. Can be set to \'vim\', or \'emacs\'.') do |keybinding|
wiki_options[:default_keybinding] = keybinding.to_s
puts wiki_options[:default_keybinding]
end
opts.separator ''
opts.separator ' Common:'