pry-vterm_aliases 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/pry/aliases/common.rb +17 -9
- data/lib/pry-vterm_aliases.rb +1 -1
- metadata +4 -4
data/lib/pry/aliases/common.rb
CHANGED
@@ -1,13 +1,21 @@
|
|
1
|
-
|
2
|
-
class
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
if defined? Pry::Plugins::VTerm
|
2
|
+
class Pry::Plugins::VTerm
|
3
|
+
class << self
|
4
|
+
command = 'bash'
|
5
|
+
if ENV['SHELL'] =~ %r!/zsh\Z!
|
6
|
+
command = 'zsh'
|
7
|
+
end
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
9
|
+
@@aliases = `#{command} -i -c 'alias'`.each_line.to_a.map(&:chomp).delete_if { |line| line !~ /=/ }.inject({}) do |hash, cmd|
|
10
|
+
cmd = Shellwords.shellwords(cmd.gsub(/\Aalias\s{1}/, '')).join
|
11
|
+
cmd = cmd.split('=')
|
12
|
+
cmd[1] = cmd[1..-1].join('=')
|
13
|
+
|
14
|
+
# Just double check...
|
15
|
+
unless cmd[0] =~ /\s/
|
16
|
+
hash.update({cmd[0] => cmd[1]})
|
17
|
+
end
|
18
|
+
end
|
11
19
|
end
|
12
20
|
end
|
13
21
|
end
|
data/lib/pry-vterm_aliases.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pry-vterm_aliases
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-02-
|
12
|
+
date: 2012-02-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pry
|
16
|
-
requirement: &
|
16
|
+
requirement: &21626840 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: 0.9.8
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *21626840
|
25
25
|
description: Preserve your VTerm aliases in Pry.
|
26
26
|
email:
|
27
27
|
- jordon@envygeeks.com
|