This file is indexed.

/usr/share/doc/ruby-shellany/README.md is in ruby-shellany 0.0.1-1.

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
70
71
72
# Shellany

Shellany captures command output.

## Features:

- portability (should work on recent JRuby versions)
- capturing stdout, stderr in a convenient way
- returning the result in a convenient way
- detecting if a shell is needed (though incomplete/primitive implementation)
- prevents running the same command multiple times

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'shellany'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install shellany

## Usage

Basic usage:

```ruby
require 'shellany/sheller'

Shellany::Sheller.stdout("echo abc") # => "abc"
Shellany::Sheller.stderr("touch /foo") # => "touch: cannot touch  ‘/aef’: Permission denied
Shellany::Sheller.run("false") # => false
Shellany::Sheller.system("clear") # => clears screen (no capture done)
```

Using Sheller object:

```ruby
require 'shellany/sheller'

sh = Shellany::Sheller.new('grep /etc/passed|tail -n 1') # does nothing

sh.stdout # shows output (runs the command since it wasn't run)
sh.stderr # shows stderr (does not run the command)
sh.ok? # returns true if exit code was zero (does not run the command)
```

## Project status

Only developed enough for Guard to run, though pull requests are more than welcome.

Especially for:

- better API
- better shell detection code
- better support for various system() arguments
- better support for redireciton handling
- better support for shell detection (e.g. Windows)

## Contributing

1. Fork it ( https://github.com/[my-github-username]/shellany/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request