Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new fqdn autocomplete for external apps
- Loading branch information
Chas Wareing
committed
Dec 19, 2013
1 parent
d3a0ce4
commit 48b0d31
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require 'json' | ||
|
||
ashrc = ENV['HOME'] + "/.ashrc" | ||
$tunnel = "" | ||
host = ARGV[0] | ||
$default_profile = "Pro" | ||
|
||
f = File.open(ashrc, 'r') | ||
json = f.read | ||
hash = JSON.parse(json) | ||
|
||
stuff = hash.select{|key, hash| key=""} | ||
|
||
stuff.each do|k,v| | ||
v.each do|key, value| | ||
case key | ||
when "fqdn" | ||
puts value | ||
end | ||
end | ||
end | ||
|