idl_erep 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +38 -9
- data/bin/idl_erep +20 -3
- data/idl_erep.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1efb24bc5e8942fefb2939314e3476d019a7b8c
|
4
|
+
data.tar.gz: 0c63364f0e59fb6a9b9ab2ef38063fe573eb2c31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eaa6d71977da7199a22d6bfe04adecfc4d557f359efc8f05bdab8ab23ed1ddd9ebbc3a6a03eb1262d007c5bacf950578c829f063179995f27b00ef9e90368c22
|
7
|
+
data.tar.gz: 4d1a3285f041331d468ef757f6eb662a8df8dff588b8a80f4025aeec268211e5d31bb8f83ebdb2e1ad221b90006ab89a9c90a634f2073a7d36ef38851bde350a
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
IDL-EREP
|
2
2
|
===
|
3
|
+
[](http://badge.fury.io/rb/idl_erep)
|
4
|
+
|
3
5
|
An enhanced interactive environment for IDL (Interactive Data Language).
|
4
6
|
|
5
7
|
It provides stronger command history, tab-completion, and key shortcuts.
|
@@ -62,14 +64,41 @@ Configurations
|
|
62
64
|
|
63
65
|
In `~/.idl_profile`, you can set some configurations of this environment.
|
64
66
|
|
65
|
-
| variable
|
66
|
-
|
67
|
-
| `idlbin`
|
68
|
-
| `prompt`
|
69
|
-
| `idlhist`
|
70
|
-
| `homehist`
|
71
|
-
| `currhist`
|
72
|
-
| `histlim`
|
73
|
-
| `
|
67
|
+
| variable | default | description |
|
68
|
+
|:---------------|:--------------------------|:-----------------------------------------------------|
|
69
|
+
| `idlbin` | 'idl' | PATH of IDL executable file |
|
70
|
+
| `prompt` | 'IDL-EREP> ' | prompt string of this environment |
|
71
|
+
| `idlhist` | '~/.idl/idl/rbuf/history' | PATH of default IDL history file (used only reading) |
|
72
|
+
| `homehist` | '~/.idl\_history' | PATH of IDL-EREP history file in home directory |
|
73
|
+
| `currhist` | './.idl\_history' | PATH of IDL-EREP history file in current directory |
|
74
|
+
| `histlim` | 10000 | limit number of IDL-EREP history file elements |
|
75
|
+
| `defcomplist` | ['help', 'plot', etc..] | default completion keywords list |
|
76
|
+
| `compfuncs` | ['defcomplist', etc...] | completion functions |
|
77
|
+
|
78
|
+
|
79
|
+
About Completion Functions
|
80
|
+
---
|
81
|
+
|
82
|
+
You can add completion functions in `~/.idl_profile`.
|
83
|
+
The functions must return array of completion keywords like following:
|
84
|
+
|
85
|
+
```ruby
|
86
|
+
compfuncs = ["defcomplist", "get_dir_elems", "get_dir_pros"]
|
87
|
+
|
88
|
+
def get_dir_elems()
|
89
|
+
Dir::entries(Dir::pwd)
|
90
|
+
end
|
91
|
+
|
92
|
+
def get_dir_pros()
|
93
|
+
pros = Dir::entries(Dir::pwd).select do |i|
|
94
|
+
i =~ /\.pro$/
|
95
|
+
end
|
96
|
+
pros.map! do |i|
|
97
|
+
i.gsub(/\.pro$/, '')
|
98
|
+
end
|
99
|
+
pros
|
100
|
+
end
|
101
|
+
```
|
102
|
+
|
74
103
|
|
75
104
|
|
data/bin/idl_erep
CHANGED
@@ -14,7 +14,22 @@ idlhist = '~/.idl/idl/rbuf/history'
|
|
14
14
|
homehist = '~/.idl_history'
|
15
15
|
currhist = './.idl_history'
|
16
16
|
histlim = 10000
|
17
|
-
defcomplist = ['help
|
17
|
+
defcomplist = ['help', 'plot', 'print', 'window']
|
18
|
+
compfuncs = ["defcomplist", "get_dir_elems", "get_dir_pros"]
|
19
|
+
|
20
|
+
def get_dir_elems()
|
21
|
+
Dir::entries(Dir::pwd)
|
22
|
+
end
|
23
|
+
|
24
|
+
def get_dir_pros()
|
25
|
+
pros = Dir::entries(Dir::pwd).select do |i|
|
26
|
+
i =~ /\.pro$/
|
27
|
+
end
|
28
|
+
pros.map! do |i|
|
29
|
+
i.gsub(/\.pro$/, '')
|
30
|
+
end
|
31
|
+
pros
|
32
|
+
end
|
18
33
|
|
19
34
|
def extract_idl_command(line)
|
20
35
|
line.gsub(/ <!--.*-->$/, '')
|
@@ -43,8 +58,10 @@ def readline_hist_management(prompt)
|
|
43
58
|
end
|
44
59
|
|
45
60
|
comp = proc do |s|
|
46
|
-
complist =
|
47
|
-
|
61
|
+
complist = []
|
62
|
+
compfuncs.map do |f|
|
63
|
+
complist += eval(f)
|
64
|
+
end
|
48
65
|
complist.grep(/^#{Regexp.escape(s)}/)
|
49
66
|
end
|
50
67
|
|
data/idl_erep.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "idl_erep"
|
7
|
-
spec.version = "0.0.
|
7
|
+
spec.version = "0.0.3"
|
8
8
|
spec.authors = ["Rintaro Okamura"]
|
9
9
|
spec.email = ["rintaro.okamura+github@gmail.com"]
|
10
10
|
spec.summary = %q{An enhanced interactive environment for IDL}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: idl_erep
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rintaro Okamura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|