Module Import alias Import alias Import alias ImportFrom alias ImportFrom alias Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Call NameLoad NameLoad NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr If BoolOpAnd CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Print BinOpAdd BinOpAdd Str NameLoad Str Return Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call NameLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIs NameLoad NameLoad body Raise Call NameLoad Str orelse Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpAdd NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Str If NameLoad body AugAssignAdd NameStore Call NameLoad NameLoad If NameLoad body AugAssignAdd NameStore Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore NameLoad orelse If CompareEq NameLoad NameLoad body Assign NameStore NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore ListLoad If BoolOpAnd AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If BoolOpAnd AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore ListComp NameLoad comprehension NameStore NameLoad Call NameLoad NameLoad Assign NameStore ListComp NameLoad comprehension NameStore NameLoad Call NameLoad NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Index Num decorator_list Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpBitAnd NameLoad NameLoad Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore BinOpBitOr BinOpBitOr NameLoad NameLoad NameLoad Assign NameStore Dict For NameStore NameLoad body Assign NameStore NameLoad If CompareIn NameLoad NameLoad body Assign NameStore BinOpAdd BinOpAdd NameLoad Str NameLoad orelse If CompareIn NameLoad NameLoad body Assign NameStore NameLoad orelse If CompareIn NameLoad NameLoad body Assign NameStore BinOpAdd BinOpAdd NameLoad Str NameLoad orelse Raise Call NameLoad BinOpAdd Str Call NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr For NameStore NameLoad body If CompareIn NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd NameLoad Str NameLoad orelse Assign NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str NameLoad Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore NameLoad If NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad If NameLoad body Assign NameStore Call NameLoad NameLoad If NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad If CompareIn NameLoad NameLoad body Return SubscriptLoad NameLoad Index NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Return Dict Assign NameStore Call NameLoad NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Return Dict Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad decorator_list
N/A N/A json N/A os N/A pydoc eg color eg substitute N/A EXAMPLE_FILE_SUFFIX .md N/A VERSION 0.1.2 N/A FLAG_ONLY_CUSTOM + N/A FLAG_CUSTOM_AND_DEFAULT * N/A FLAG_FALLBACK pydoc.pager N/A ALIAS_FILE_NAME aliases.json handle_program N/A N/A program config N/A N/A N/A default_file_path None N/A custom_file_path None N/A resolved_program N/A get_resolved_program program config N/A N/A has_default_entry_for_program resolved_program config N/A N/A default_file_path N/A get_file_path_for_program resolved_program N/A config examples_dir N/A N/A has_custom_entry_for_program resolved_program config N/A N/A custom_file_path N/A get_file_path_for_program resolved_program N/A config custom_dir N/A N/A N/A default_file_path None N/A custom_file_path None N/A N/A N/A N/A No entry found for  program . Run `eg --list` to see all available entries. N/A N/A raw_contents N/A get_contents_from_files default_file_path custom_file_path N/A formatted_contents N/A get_formatted_contents raw_contents use_color N/A config use_color color_config N/A config color_config squeeze N/A config squeeze subs N/A config subs N/A N/A page_string formatted_contents N/A config pager_cmd N/A get_file_path_for_program N/A N/A program dir_to_search N/A N/A N/A 
    Return the file name and path for the program.

    examples_dir cannot be None

    Path is not guaranteed to exist. Just says where it should be if it
    existed. Paths must be fully expanded before being passed in (i.e. no ~ or
    variables).
     N/A N/A dir_to_search None N/A N/A N/A TypeError examples_dir cannot be None N/A N/A result N/A N/A N/A os path join dir_to_search N/A program EXAMPLE_FILE_SUFFIX N/A result N/A has_default_entry_for_program N/A N/A program config N/A N/A N/A Return True if has standard examples for program, else False. N/A N/A config examples_dir N/A N/A file_path N/A get_file_path_for_program program N/A config examples_dir N/A N/A N/A N/A os path isfile file_path N/A N/A False N/A has_custom_entry_for_program N/A N/A program config N/A N/A N/A Return True if has custom examples for a program, else false. N/A N/A config custom_dir N/A N/A custom_path N/A get_file_path_for_program program N/A config custom_dir N/A N/A N/A N/A os path isfile custom_path N/A N/A False N/A get_contents_from_files N/A N/A default_file_path custom_file_path N/A N/A N/A 
    Take the paths to two files and return the contents as a string. If
    custom_file_path is valid, it will be shown before the contents of the
    default file.
     N/A file_data N/A custom_file_path N/A N/A file_data N/A _get_contents_of_file custom_file_path N/A default_file_path N/A N/A file_data N/A _get_contents_of_file default_file_path N/A file_data N/A page_string N/A N/A str_to_page pager_cmd N/A N/A N/A 
    Page str_to_page via the pager.
     N/A use_fallback_page_function False N/A N/A pager_cmd None N/A N/A use_fallback_page_function True N/A N/A N/A pager_cmd FLAG_FALLBACK N/A N/A use_fallback_page_function True N/A use_fallback_page_function N/A N/A N/A N/A pydoc pager str_to_page N/A N/A N/A N/A pydoc pipepager str_to_page cmd pager_cmd N/A _get_contents_of_file N/A N/A path N/A N/A N/A Get the contents of the file at path. The file must exist. N/A N/A open path r f N/A N/A result N/A N/A f read N/A result N/A _is_example_file N/A N/A file_name N/A N/A N/A 
    True if the file_name is an example file, else False.
     N/A N/A N/A file_name endswith EXAMPLE_FILE_SUFFIX N/A get_list_of_all_supported_commands N/A N/A config N/A N/A N/A 
    Generate a list of all the commands that have examples known to eg. The
    format of the list is the command names. The fact that there are examples
    for 'cp', for example, would mean that 'cp' was in the list.

    The format of the list contains additional information to say if there are
    only default examples, only custom examples, or both:

        cp    (only default)
        cp *  (only custom)
        cp +  (default and custom)

    Aliases are shown as
    alias -> resolved, with resolved having its '*' or '+' as expected. Aliases
    that shadow custom-only file names are expected to be shown instead of the
    custom file names. This is intentional, as that is the behavior for file
    resolution--an alias will hide a custom file.
     N/A default_files N/A N/A custom_files N/A N/A N/A N/A config examples_dir N/A N/A N/A os path isdir N/A config examples_dir N/A N/A default_files N/A N/A os listdir N/A config examples_dir N/A N/A N/A config custom_dir N/A N/A N/A os path isdir N/A config custom_dir N/A N/A custom_files N/A N/A os listdir N/A config custom_dir N/A default_files N/A path N/A path default_files N/A _is_example_file path N/A custom_files N/A path N/A path custom_files N/A _is_example_file path get_without_suffix N/A N/A file_name N/A N/A N/A 
        Return the file name without the suffix, or the file name itself
        if it does not have the suffix.
         N/A N/A N/A N/A file_name split EXAMPLE_FILE_SUFFIX N/A 0 N/A N/A default_files N/A N/A get_without_suffix f N/A f default_files N/A custom_files N/A N/A get_without_suffix f N/A f custom_files N/A set_default_commands N/A set default_files N/A set_custom_commands N/A set custom_files N/A alias_dict N/A get_alias_dict config N/A both_defined N/A set_default_commands set_custom_commands N/A only_default N/A set_default_commands set_custom_commands N/A only_custom N/A set_custom_commands set_default_commands N/A all_commands N/A N/A both_defined only_default only_custom N/A command_to_rep N/A N/A command all_commands N/A N/A rep None N/A N/A command both_defined N/A N/A rep N/A N/A command FLAG_CUSTOM_AND_DEFAULT N/A N/A N/A command only_default N/A N/A rep command N/A N/A N/A command only_custom N/A N/A rep N/A N/A command FLAG_ONLY_CUSTOM N/A N/A N/A NameError N/A command not in known set:  N/A str command N/A N/A command_to_rep N/A command rep N/A result N/A N/A all_commands_and_aliases N/A N/A all_commands union N/A N/A alias_dict keys N/A command all_commands_and_aliases N/A N/A N/A command alias_dict N/A N/A target N/A alias_dict N/A command N/A rep_of_target N/A command_to_rep N/A target N/A N/A N/A result append N/A N/A command  ->  rep_of_target N/A N/A rep N/A command_to_rep N/A command N/A N/A N/A result append rep N/A N/A N/A result sort N/A result N/A get_squeezed_contents N/A N/A contents N/A N/A N/A 
    Squeeze the contents by removing blank lines between definition and example
    and remove duplicate blank lines except between sections.
     N/A line_between_example_code N/A N/A substitute Substitution True N/A lines_between_examples N/A N/A substitute Substitution True N/A lines_between_sections N/A N/A substitute Substitution True N/A result contents N/A result N/A N/A line_between_example_code apply_and_get_result result N/A result N/A N/A lines_between_examples apply_and_get_result result N/A result N/A N/A lines_between_sections apply_and_get_result result N/A result N/A get_colorized_contents N/A N/A contents color_config N/A N/A N/A Colorize the contents based on the color_config. N/A colorizer N/A N/A color EgColorizer color_config N/A result N/A N/A colorizer colorize_text contents N/A result N/A get_substituted_contents N/A N/A contents substitutions N/A N/A N/A 
    Perform a list of substitutions and return the result.

    contents: the starting string on which to beging substitutions
    substitutions: list of Substitution objects to call, in order, with the
        result of the previous substitution.
     N/A result contents N/A sub substitutions N/A N/A result N/A N/A sub apply_and_get_result result N/A result N/A get_formatted_contents N/A N/A raw_contents use_color color_config squeeze subs N/A N/A N/A 
    Apply formatting to raw_contents and return the result. Formatting is
    applied in the order: color, squeeze, subs.
     N/A result raw_contents N/A use_color N/A N/A result N/A get_colorized_contents result color_config N/A squeeze N/A N/A result N/A get_squeezed_contents result N/A subs N/A N/A result N/A get_substituted_contents result subs N/A result N/A get_resolved_program N/A N/A program config_obj N/A N/A N/A 
    Take a program that may be an alias for another program and return the
    resolved program.

    It only ever resolves a single level of aliasing, so does not support
    aliasing to an alias.

    Returns the original program if the program is not an alias.
     N/A alias_dict N/A get_alias_dict config_obj N/A N/A program alias_dict N/A N/A N/A alias_dict N/A program N/A N/A program N/A get_alias_dict N/A N/A config_obj N/A N/A N/A 
    Return a dictionary consisting of all aliases known to eg.

    The format is {'alias': 'resolved_program'}.

    If the aliases file does not exist, returns an empty dict.
     N/A N/A N/A config_obj examples_dir N/A N/A N/A N/A alias_file_path N/A _get_alias_file_path config_obj N/A N/A N/A N/A N/A os path isfile alias_file_path N/A N/A N/A N/A alias_file_contents N/A _get_contents_of_file alias_file_path N/A result N/A N/A json loads alias_file_contents N/A result N/A _get_alias_file_path N/A N/A config_obj N/A N/A N/A 
    Return the file path for the aliases dict.
     N/A N/A N/A N/A os path join N/A config_obj examples_dir ALIAS_FILE_NAME N/A