warp-dir 1.3.0 → 1.5.0
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 +33 -28
- data/lib/warp/dir/command/install.rb +2 -2
- data/lib/warp/dir/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 34527a09e81e6828cdecf70a4c83c0e86d66458c
|
|
4
|
+
data.tar.gz: ef320ca5a5098d7e0314323e3883e251915c3094
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 94c02934aead6a205dcdb9e75eb42d3ba6d104fc67c0bf64366f72267ffab9d0ccecf21a533966def3f45744e169510ea816a07a98b96c18a7473da0d2730b81
|
|
7
|
+
data.tar.gz: 2f80dc1e9aa8102bb6daefb47664ad942e6fd73ffa90def0df93a36229717d04c10e54e3a20a15418abb9b06f428ec1d9077d0c2a71bd276d27d22ef824e58f2
|
data/README.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# Warp Directory
|
|
2
2
|
|
|
3
|
+
[](https://rubygems.org/gems/ven table)
|
|
3
4
|
[](https://badge.fury.io/rb/warp-dir)
|
|
5
|
+
<br />
|
|
6
|
+
|
|
4
7
|
[](https://travis-ci.org/kigster/warp-dir)
|
|
5
8
|
[](https://codeclimate.com/github/kigster/warp-dir)
|
|
6
9
|
[](https://codeclimate.com/github/kigster/warp-dir/coverage)
|
|
@@ -27,6 +30,36 @@ The main difference is that `wd` is able to add/remove/list folder "shortcuts",
|
|
|
27
30
|
|
|
28
31
|
This of this as a folder-navigation super-charge tool that you'd use on a most frequently-used set of folders. This becomes __really useful__ if you are often finding youself going into a small number of deeply nested folders with a long path prefix.
|
|
29
32
|
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
35
|
+
Three steps:
|
|
36
|
+
|
|
37
|
+
- `wd` requires a Ruby interpreter version 2.2 higher.
|
|
38
|
+
- Please Check your default ruby with `ruby --version`. You should see something like "ruby 2.3.0p0....".
|
|
39
|
+
- If you see version 1.9 or earlier, please upgrade your ruby using the package manager native to your OS.
|
|
40
|
+
- Install `warp-dir` ruby gem (note: you may need to prefix the command with `sudo` if you are installing into the "system" ruby namespace).
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
$ gem install warp-dir --no-ri --no-rdoc
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
- [ ] The last step is to install the `wd` BASH function and auto-completion. This step appends the required shell function to your shell initialization file, that is specified with the `--dotfile` flag.
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
$ warp-dir install --dotfile ~/.bash_profile
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
After the last step you __need to restart your session__, so – if you are on Mac OS X, – please reopen your Terminal or better yet – [iTerm2](https://www.iterm2.com/), and then type:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
$ wd help
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
If the above command returns a properly formatted help that looks like the image below, your setup is now complete!
|
|
59
|
+
|
|
60
|
+

|
|
61
|
+
|
|
62
|
+
|
|
30
63
|
## Usage
|
|
31
64
|
|
|
32
65
|
__NOTE:__ in the below examples, the characters `~ ❯ ` denote the current shell prompt, showing the current folder you are in. The command to type is on the right hand side of the "❯".
|
|
@@ -86,9 +119,6 @@ See? I think we thought of everything :)
|
|
|
86
119
|
|
|
87
120
|
Happy warping!
|
|
88
121
|
|
|
89
|
-
### Detailed Usage
|
|
90
|
-
|
|
91
|
-

|
|
92
122
|
|
|
93
123
|
## `wd` Concept
|
|
94
124
|
|
|
@@ -115,31 +145,6 @@ These features will be added shortly:
|
|
|
115
145
|
* for now history is not supported
|
|
116
146
|
* for now '-' is not supported
|
|
117
147
|
|
|
118
|
-
## Installation
|
|
119
|
-
|
|
120
|
-
Three steps:
|
|
121
|
-
|
|
122
|
-
1. This `wd` requires version 2+ of ruby interpreter. Check your default ruby with `ruby --version`. You should see something like "ruby 2.3.0p0....". If you see version 1.9 or earlier, upgrade your ruby with `brew update; brew install ruby`.
|
|
123
|
-
2. Install warp-dir gem:
|
|
124
|
-
```bash
|
|
125
|
-
~ ❯ gem install warp-dir --no-ri --no-rdoc
|
|
126
|
-
```
|
|
127
|
-
3. The last step is to install the `wd` BASH function and auto-completion:
|
|
128
|
-
```bash
|
|
129
|
-
~ ❯ warp-dir install --dotfile ~/.bash_profile
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
This last step appends the required shell function to the shell initialization file specified with the `--dotfile` flag. If you are unsure what that means, please run the command above as is.
|
|
133
|
-
|
|
134
|
-
And step 3 you will need to restart your shell, so reopen your Terminal or [iTerm2](https://www.iterm2.com/) (please use iTerm over Terminal — it's soooo much better!), and then type:
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
~ ❯ wd help
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
If the above command returns a properly formatted help like the image below, your setup
|
|
141
|
-
is now complete!
|
|
142
|
-
|
|
143
148
|
## Future Development
|
|
144
149
|
|
|
145
150
|
I have so many cool ideas about where this can go, that I created a
|
|
@@ -19,7 +19,7 @@ class Warp::Dir::Command::Install < Warp::Dir::Command
|
|
|
19
19
|
|
|
20
20
|
def already_installed?(file_path)
|
|
21
21
|
path = ::Warp::Dir.absolute(file_path)
|
|
22
|
-
matches = if File.
|
|
22
|
+
matches = if File.exist?(path)
|
|
23
23
|
File.open path do |file|
|
|
24
24
|
file.find { |line| line =~ ::Warp::Dir::SHELL_WRAPPER_REGX }
|
|
25
25
|
end
|
|
@@ -84,7 +84,7 @@ class Warp::Dir::Command::Install < Warp::Dir::Command
|
|
|
84
84
|
file = ::Warp::Dir.absolute(shell_init_file)
|
|
85
85
|
pre_installed = self.class.already_installed?(file)
|
|
86
86
|
self.existing << file if pre_installed
|
|
87
|
-
if File.
|
|
87
|
+
if File.exist?(file)
|
|
88
88
|
if !pre_installed || config[:force]
|
|
89
89
|
source = File.read(file)
|
|
90
90
|
source.gsub!(/# WarpDir.*BEGIN\n.*\n# WarpDir.*END/, '')
|
data/lib/warp/dir/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: warp-dir
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Konstantin Gredeskoul
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-07-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: slop
|
|
@@ -167,3 +167,4 @@ specification_version: 4
|
|
|
167
167
|
summary: Warp-Dir (aka 'wd') replaces 'cd' and lets you instantly move between saved
|
|
168
168
|
"warp points" and regular folders.
|
|
169
169
|
test_files: []
|
|
170
|
+
has_rdoc:
|