{
    "content": [
        {
            "type": "text",
            "text": "# readline (pydoc)\n\n**Summary:** readline - Importing this module enables command line editing using GNU readline.\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **MODULE REFERENCE** (8 lines)\n- **FUNCTIONS** (1 lines) — 27 subsections\n  - add_history (2 lines)\n  - append_history_file (4 lines)\n  - clear_history (2 lines)\n  - get_begidx (2 lines)\n  - get_completer (2 lines)\n  - get_completer_delims (2 lines)\n  - get_completion_type (2 lines)\n  - get_current_history_length (2 lines)\n  - get_endidx (2 lines)\n  - get_history_item (2 lines)\n  - get_history_length (2 lines)\n  - get_line_buffer (2 lines)\n  - insert_text (2 lines)\n  - parse_and_bind (2 lines)\n  - read_history_file (4 lines)\n  - read_init_file (4 lines)\n  - redisplay (2 lines)\n  - remove_history_item (2 lines)\n  - replace_history_item (4 lines)\n  - set_auto_history (2 lines)\n  - set_completer (6 lines)\n  - set_completer_delims (2 lines)\n  - set_completion_display_matches_hook (6 lines)\n  - set_history_length (4 lines)\n  - set_pre_input_hook (6 lines)\n  - set_startup_hook (5 lines)\n  - write_history_file (4 lines)\n- **FILE** (3 lines)\n\n## Full Content\n\n### NAME\n\nreadline - Importing this module enables command line editing using GNU readline.\n\n### MODULE REFERENCE\n\nhttps://docs.python.org/3.10/library/readline.html\n\nThe following documentation is automatically generated from the Python\nsource files.  It may be incomplete, incorrect or include features that\nare considered implementation detail and may vary between Python\nimplementations.  When in doubt, consult the module reference at the\nlocation listed above.\n\n### FUNCTIONS\n\n#### add_history\n\nAdd an item to the history buffer.\n\n#### append_history_file\n\nAppend the last nelements items of the history list to file.\n\nThe default filename is ~/.history.\n\n#### clear_history\n\nClear the current readline history.\n\n#### get_begidx\n\nGet the beginning index of the completion scope.\n\n#### get_completer\n\nGet the current completer function.\n\n#### get_completer_delims\n\nGet the word delimiters for completion.\n\n#### get_completion_type\n\nGet the type of completion being attempted.\n\n#### get_current_history_length\n\nReturn the current (not the maximum) length of history.\n\n#### get_endidx\n\nGet the ending index of the completion scope.\n\n#### get_history_item\n\nReturn the current contents of history item at one-based index.\n\n#### get_history_length\n\nReturn the maximum number of lines that will be written to the history file.\n\n#### get_line_buffer\n\nReturn the current contents of the line buffer.\n\n#### insert_text\n\nInsert text into the line buffer at the cursor position.\n\n#### parse_and_bind\n\nExecute the init line provided in the string argument.\n\n#### read_history_file\n\nLoad a readline history file.\n\nThe default filename is ~/.history.\n\n#### read_init_file\n\nExecute a readline initialization file.\n\nThe default filename is the last filename used.\n\n#### redisplay\n\nChange what's displayed on the screen to reflect contents of the line buffer.\n\n#### remove_history_item\n\nRemove history item given by its zero-based position.\n\n#### replace_history_item\n\nReplaces history item given by its position with contents of line.\n\npos is zero-based.\n\n#### set_auto_history\n\nEnables or disables automatic history.\n\n#### set_completer\n\nSet or remove the completer function.\n\nThe function is called as function(text, state),\nfor state in 0, 1, 2, ..., until it returns a non-string.\nIt should return the next possible completion starting with 'text'.\n\n#### set_completer_delims\n\nSet the word delimiters for completion.\n\n#### set_completion_display_matches_hook\n\nSet or remove the completion display function.\n\nThe function is called as\nfunction(substitution, [matches], longestmatchlength)\nonce each time matches need to be displayed.\n\n#### set_history_length\n\nSet the maximal number of lines which will be written to the history file.\n\nA negative length is used to inhibit history truncation.\n\n#### set_pre_input_hook\n\nSet or remove the function invoked by the rlpreinputhook callback.\n\nThe function is called with no arguments after the first prompt\nhas been printed and just before readline starts reading input\ncharacters.\n\n#### set_startup_hook\n\nSet or remove the function invoked by the rlstartuphook callback.\n\nThe function is called with no arguments just\nbefore readline prints the first prompt.\n\n#### write_history_file\n\nSave a readline history file.\n\nThe default filename is ~/.history.\n\n### FILE\n\n/usr/lib/python3.10/lib-dynload/readline.cpython-310-x8664-linux-gnu.so\n\n"
        }
    ],
    "structuredContent": {
        "command": "readline",
        "section": "",
        "mode": "pydoc",
        "summary": "readline - Importing this module enables command line editing using GNU readline.",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "MODULE REFERENCE",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "FUNCTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "add_history",
                        "lines": 2
                    },
                    {
                        "name": "append_history_file",
                        "lines": 4
                    },
                    {
                        "name": "clear_history",
                        "lines": 2
                    },
                    {
                        "name": "get_begidx",
                        "lines": 2
                    },
                    {
                        "name": "get_completer",
                        "lines": 2
                    },
                    {
                        "name": "get_completer_delims",
                        "lines": 2
                    },
                    {
                        "name": "get_completion_type",
                        "lines": 2
                    },
                    {
                        "name": "get_current_history_length",
                        "lines": 2
                    },
                    {
                        "name": "get_endidx",
                        "lines": 2
                    },
                    {
                        "name": "get_history_item",
                        "lines": 2
                    },
                    {
                        "name": "get_history_length",
                        "lines": 2
                    },
                    {
                        "name": "get_line_buffer",
                        "lines": 2
                    },
                    {
                        "name": "insert_text",
                        "lines": 2
                    },
                    {
                        "name": "parse_and_bind",
                        "lines": 2
                    },
                    {
                        "name": "read_history_file",
                        "lines": 4
                    },
                    {
                        "name": "read_init_file",
                        "lines": 4
                    },
                    {
                        "name": "redisplay",
                        "lines": 2
                    },
                    {
                        "name": "remove_history_item",
                        "lines": 2
                    },
                    {
                        "name": "replace_history_item",
                        "lines": 4
                    },
                    {
                        "name": "set_auto_history",
                        "lines": 2
                    },
                    {
                        "name": "set_completer",
                        "lines": 6
                    },
                    {
                        "name": "set_completer_delims",
                        "lines": 2
                    },
                    {
                        "name": "set_completion_display_matches_hook",
                        "lines": 6
                    },
                    {
                        "name": "set_history_length",
                        "lines": 4
                    },
                    {
                        "name": "set_pre_input_hook",
                        "lines": 6
                    },
                    {
                        "name": "set_startup_hook",
                        "lines": 5
                    },
                    {
                        "name": "write_history_file",
                        "lines": 4
                    }
                ]
            },
            {
                "name": "FILE",
                "lines": 3,
                "subsections": []
            }
        ]
    }
}