wordexp 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +23 -2
- data/lib/wordexp/version.rb +1 -1
- data/lib/wordexp/wordexp_ext.bundle +0 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74b8825ba1eb747d6daa66cea1329da2d57e182fbd7bde424ff974cea3ef3e52
|
4
|
+
data.tar.gz: 3c0217d74209d355ba81e0de3db8c9adccad0df678a5ca0ce4c945be4804e3f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9da4bf325bea3bd9766b28cb87e44c07fe76be8718c3e5bf1e4c1378e4e009bbe5f24efa9b189d7084e59425505bcdf65e91ccb9323fa9ddb391e515660d9ec
|
7
|
+
data.tar.gz: 310cc1fef990b68f0c576b4ef07fac061c7f0183b4f1d7d7e3ca23d6d92c2366743e962375d27634d74e489bc574f9f5b1443a09ca3509d859ef068449f53f52
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
[![Circle](https://circleci.com/gh/samsonjs/wordexp/tree/main.svg?style=shield)](https://app.circleci.com/pipelines/github/samsonjs/wordexp?branch=main)
|
5
5
|
[![Code Climate Maintainability](https://api.codeclimate.com/v1/badges/21cc24badf15d19b5cec/maintainability)](https://codeclimate.com/github/samsonjs/wordexp/maintainability)
|
6
6
|
|
7
|
-
A Ruby gem for performing shell word expansion using [wordexp][]. It's like [Shellwords][] turned up to 11. Not only does it split taking quotes into account, but it also expands environment variables and tildes, and runs subcommands in
|
7
|
+
A Ruby gem for performing shell word expansion using [wordexp][]. It's like [Shellwords][] turned up to 11. Not only does it split taking quotes into account, but it also expands environment variables and tildes, and runs subcommands in `` `backticks` `` or `$(dollar parentheses)`.
|
8
8
|
|
9
9
|
[wordexp]: https://man7.org/linux/man-pages/man3/wordexp.3.html
|
10
10
|
[Shellwords]: https://ruby-doc.org/stdlib-3.1.0/libdoc/shellwords/rdoc/Shellwords.html
|
@@ -33,7 +33,28 @@ fork { exec(*cmd) }
|
|
33
33
|
# roof cats /home/queso /home/queso/bin 2022-01-16
|
34
34
|
```
|
35
35
|
|
36
|
-
With that you're half way to a [fairly usable shell in Ruby](https://github.com/samsonjs/csc360-a1-shell).
|
36
|
+
With that you're half way to a [fairly usable shell in Ruby](https://github.com/samsonjs/csc360-a1-shell). Ok maybe not half but it's a start.
|
37
|
+
|
38
|
+
## Command line
|
39
|
+
|
40
|
+
Just for fun there's a command line executable that you can use to play around or debug. Note that when you're calling it from another shell you have to quote everything liberally as to not have it interpret anything. It takes a single string as its argument so you'll want to use your shell's strictest quoting, e.g. in zsh:
|
41
|
+
|
42
|
+
```zsh
|
43
|
+
bundle exec wordexp $'echo "hello there" \'blah blah\' "$(date)"'
|
44
|
+
```
|
45
|
+
|
46
|
+
You can also open up irb and interact with it there:
|
47
|
+
|
48
|
+
```ruby
|
49
|
+
>> require 'wordexp'
|
50
|
+
=> true
|
51
|
+
>> Wordexp.expand('echo "hello there" \'blah blah\' "$(date)"')
|
52
|
+
=> ["echo", "hello there", "blah blah", "Sun 16 Jan 2022 22:43:08 PST"]
|
53
|
+
>> Wordexp.expand <<~EOT.strip
|
54
|
+
echo "hello there" 'blah blah' "$(date)"
|
55
|
+
EOT
|
56
|
+
=> ["echo", "hello there", "blah blah", "Sun 16 Jan 2022 22:43:08 PST"]
|
57
|
+
```
|
37
58
|
|
38
59
|
## Support
|
39
60
|
|
data/lib/wordexp/version.rb
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wordexp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sami Samhuri
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -45,14 +45,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
45
45
|
requirements:
|
46
46
|
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: 2.
|
48
|
+
version: 2.7.0
|
49
49
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: '0'
|
54
54
|
requirements: []
|
55
|
-
rubygems_version: 3.
|
55
|
+
rubygems_version: 3.4.1
|
56
56
|
signing_key:
|
57
57
|
specification_version: 4
|
58
58
|
summary: A Ruby gem for performing shell word expansion using wordexp
|