This file is indexed.

/usr/share/origami/shell/.irbrc is in origami-pdf 2.0.0-1ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
begin
    require 'origami'
rescue LoadError
    $: << File.join(__dir__, '../../lib')
    require 'origami'
end
include Origami

require 'console.rb'
require 'readline'

OPENSSL_SUPPORT = (defined?(OpenSSL).nil?) ? 'no' : 'yes'
JAVASCRIPT_SUPPORT = (defined?(PDF::JavaScript::Engine).nil?) ? 'no' : 'yes'
DEFAULT_BANNER = "Welcome to the PDF shell (Origami release #{Origami::VERSION}) [OpenSSL: #{OPENSSL_SUPPORT}, JavaScript: #{JAVASCRIPT_SUPPORT}]\n"

def set_completion
    completionProc = proc { |input|
        bind = IRB.conf[:MAIN_CONTEXT].workspace.binding

        case input
        when /^(.*)::$/
            begin
                space = eval("Origami::#{$1}", bind)
            rescue Exception
                return []
            end

            return space.constants.reject{|const| space.const_get(const) <= Exception}

        when /^(.*).$/
            begin
                space = eval($1, bind)
            rescue
                return []
            end

            return space.public_methods
        end
    }

    if Readline.respond_to?("basic_word_break_characters=")
        Readline.basic_word_break_characters= " \t\n\"\\'`><=;|&{("
    end

    Readline.completion_append_character = nil
    Readline.completion_proc = completionProc
end

def set_prompt
    IRB.conf[:PROMPT][:PDFSH] = {
        PROMPT_C: "?>> ",
        RETURN: "%s\n",
        PROMPT_I: ">>> ",
        PROMPT_N: ">>> ",
        PROMPT_S: nil
    }

    IRB.conf[:PROMPT_MODE] = :PDFSH
    IRB.conf[:AUTO_INDENT] = true
end

# Print the shell banner.
puts DEFAULT_BANNER.green

# Import the type conversion helper routines.
TOPLEVEL_BINDING.eval("using Origami::TypeConversion")

#set_completion
set_prompt