# for emacs: -*- python -*-

# LUCI description file to configure readline.
# descriptions are from bash(1) man page.

config_file_name =  '~/.inputrc'
config_file_type =  'set'
title='Readline Variables'

bell_style={
'name'          : 'Bell Style',
'description'   : 'Controls  what  happens when readline wants to ring the terminal bell.  If set to none, readline  never rings the bell.  If set to visible, readline uses a visible bell if one is available.  If set to  audible, readline attempts to ring the terminal\'s bell.',
'value_type'    : 'list',
'list_values'   : [ 'none', 'visible', 'audible'],
'presence'      : 'optional',
'config_name'   : 'bell-style'
}

comment_begin={
'name'          : 'Comment Begin',
'description'   : 'The string  that  is  inserted  when  the  readline insert-comment  command  is executed.  This command is bound to M-# in emacs mode and to # in  vi  command mode.',
'presence'      : 'optional',
'config_name'   : 'comment-begin'
}

completion_ignore_case={
'name'          : 'Completion Ignore Case',
'description'   : 'If  set  to On, readline performs filename matching and completion in a case-insensitive fashion.',
'value_type'    : 'list',
'list_values'   : [ 'Off', 'On'],
'presence'      : 'optional',
'config_name'   : 'completion-ignore-case'
}

completion_query_items={
'name'          : 'Completion Query Items',
'description'   : 'This determines when  the  user  is  queried  about viewing  the  number of possible completions generated by the possible-completions command.   It  may be  set  to any integer value greater than or equal. If the number of possible completions  is greater  than  or  equal to the value of this variable, the user is asked whether or not he wishes to view  them; otherwise they are simply listed on the terminal.',
'value_type'    : 'integer',
'integer_limits': (0,60000),
'presence'      : 'optional',
'size'          : 70,
'config_name'   : 'completion-query-items'
}

convert_meta={
'name'          : 'Convert Meta',
'description'   : 'If set to On, readline will convert characters with the  eighth  bit  set  to  an ASCII key sequence by stripping the eighth bit and  prefixing  an  escape character (in effect, using escape as the meta prefix).',
'value_type'    : 'list',
'list_values'   : ['On', 'Off'],
'presence'      : 'optional',
'config_name'   : 'convert-meta'
}

disable_completion={
'name'          : 'Disable Completion',
'description'   : 'If set to On, readline will  inhibit  word  completion. Completion characters will be inserted into the line as if they had been mapped to self-insert.',
'value_type'    : 'list',
'list_values'   : [ 'Off', 'On'],
'presence'      : 'optional',
 
'config_name'   : 'disable-completion'
}

editing_mode={
'name'          : 'Editing Mode',
'description'   : 'Controls  whether readline begins with a set of key bindings similar to emacs or vi.  editing-mode can be set to either emacs (for normal peoples) or vi (for psychos).',
'value_type'    : 'list',
'list_values'   : [ 'emacs', 'vi'],
'presence'      : 'optional',
'config_name'   : 'editing-mode'
}

enable_keypad={
'name'          : 'Enable Keypad',
'description'   : 'When  set  to  On,  readline will try to enable the application keypad when it is called. Some systems need this to enable the arrow keys.',
'value_type'    : 'list',
'list_values'   : [ 'Off', 'On'],
'presence'      : 'optional',
'config_name'   : 'enable-keypad'
}

expand_tilde={
'name'          : 'Expand Tilde',
'description'   : 'If  set  to  on,  tilde expansion is performed when readline attempts word completion.',
'value_type'    : 'list',
'list_values'   : [ 'Off', 'On'],
'presence'      : 'optional',
'config_name'   : 'expand-tilde'
}

horizontal_scroll_mode={
'name'          : 'Horizontal Scroll Mode',
'description'   : 'When set to On, makes readline use  a  single  line for  display, scrolling the input horizontally on a single screen line when it becomes longer than  the screen width rather than wrapping to a new line.',
'value_type'    : 'list',
'list_values'   : [ 'Off', 'On'],
'presence'      : 'optional',
'config_name'   : 'horizontal-scroll-mode'
}

input_meta={
'name'          : 'Input Meta',
'description'   : 'If  set to On, readline will enable eight-bit input (that is, it will not strip the high bit from  the characters it reads), regardless of what the terminal claims it can support. The name meta-flag is a synonym for this variable.',
'value_type'    : 'list',
'list_values'   : [ 'Off', 'On'],
'presence'      : 'optional',
'config_name'   : 'input-meta'
}

isearch_terminators={
'name'          : 'Isearch Terminators',
'description'   : 'The  string  of characters that should terminate an incremental search without  subsequently  executing the  character  as a command.  If this variable has not been given a value, the characters ESC and  C-J will terminate an incremental search. (default C-[C-J)',
'presence'      : 'optional',
'config_name'   : 'isearch-terminators'
}

keymap={
'name'          : 'Keymap',
'description'   : 'Set the current readline keymap. vi is equivalent to vi-command; emacs  is  equivalent  to emacs-standard.   The  default  value is emacs; the value of  editing-mode  also  affects  the  default keymap.',
'value_type'    : 'list',
'list_values'   : [ 'emacs', 'emacs-standard', 'emacs-meta',
                    'emacs-ctlx',  'vi',  'vi-command', 'vi-insert'],
'presence'      : 'optional',
'config_name'   : 'keymap'
}

mark_directories={
'name'          : 'Mark Directories',
'description'   : 'If  set  to  On,  completed  directory names have a slash appended.',
'value_type'    : 'list',
'list_values'   : ['On', 'Off'],
'presence'      : 'optional',
'config_name'   : 'mark-directories'
}

mark_modified_lines={
'name'          : 'Mark Modified Lines',
'description'   : 'If set to On, history lines that have been modified are displayed with a preceding asterisk (*).',
'value_type'    : 'list',
'list_values'   : [ 'Off', 'On'],
'presence'      : 'optional',
'config_name'   : 'mark-modified-lines'
}

match_dot={
'name'          : 'Match Dot',
'description'   : 'If  set  to  Off,  the filename completion will not show filenames starting with a dot when listing completions for a whole directory.',
'value_type'    : 'list',
'list_values'   : ['On', 'Off'],
'presence'      : 'optional',
'config_name'   : 'match-dot'
}

output_meta={
'name'          : 'Output Meta',
'description'   : 'If set to On, readline will display characters with the eighth bit set directly rather than as a meta-prefixed escape sequence.',
'value_type'    : 'list',
'list_values'   : [ 'Off', 'On'],
'presence'      : 'optional',
'config_name'   : 'output-meta'
}

print_completions_horizontally={
'name'          : 'Print Completions Horizontally',
'description'   : 'If  set  to  On,  readline will display completions with matches sorted  horizontally  in  alphabetical order, rather than down the screen.',
'value_type'    : 'list',
'list_values'   : [ 'Off', 'On'],
'presence'      : 'optional',
'config_name'   : 'print-completions-horizontally'
}

show_all_if_ambiguous={
'name'          : 'Show All If Ambiguous',
'description'   : 'This  alters the default behavior of the completion functions. If set to on, words which have more than one possible completion cause the matches to be listed immediately instead of ringing the bell.',
'value_type'    : 'list',
'list_values'   : [ 'Off', 'On'],
'presence'      : 'optional',
'config_name'   : 'show-all-if-ambiguous'
}

visible_stats={
'name'          : 'Visible Stats',
'description'   : 'If set to On, a character denoting a file\'s type as reported by stat(2) is appended to the filename when listing possible completions.',
'value_type'    : 'list',
'list_values'   : [ 'Off', 'On'],
'presence'      : 'optional', 
'config_name'   : 'visible-stats'
}