warp-dir 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +10 -16
- data/Rakefile +36 -5
- data/bin/console +0 -1
- data/lib/warp/dir.rb +2 -3
- data/lib/warp/dir/command/ls.rb +1 -1
- data/lib/warp/dir/command/remove.rb +1 -1
- data/lib/warp/dir/serializer/dotfile.rb +1 -0
- data/lib/warp/dir/version.rb +1 -1
- data/warp-dir.gemspec +1 -1
- metadata +2 -4
- data/Gemfile +0 -4
- data/bin/setup +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6ec44f13babd62ebe33c745d7d7092fb952a0a9
|
4
|
+
data.tar.gz: 05f95afa9a62f41cc6db11c34da440f1c198285a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d30616fa3c72e44bf067309e7c17439b9b7979f1a85a9990e1351fa0f1e14572fef2cd3b5f4b27ac1710832b8f3d53b7e3084dc5b2dbeebdacaa7956c9f6a41d
|
7
|
+
data.tar.gz: f91e1dd10053a0de0fd68791b42073c2c26ef75a48891aacb0c8828aaa9d89fb08b006878f3e7c88f69f7527efb1e93d83c08d3261747d4e0b9158ddad97781a
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -47,19 +47,13 @@ And then execute:
|
|
47
47
|
Or install it yourself as:
|
48
48
|
|
49
49
|
$ gem install warp-dir --no-ri --no-rdoc
|
50
|
-
|
51
|
-
After the installation, you will have the `warp-dir` command in the path. You can use
|
52
|
-
this command almost like `wd` except it can not warp you to another folder due to
|
53
|
-
UNIX parent/child process restrictions. To do that you need to also install the shell
|
54
|
-
function wrapper in your `~/.bashrc` or similar file:
|
55
|
-
|
56
|
-
You can do like so (if you don't provide file, it will install in `~/.bashrc`, `~/.bash_profile`
|
57
|
-
or `~/.profile` whichever works first, – so use `--file` to override it if you need to).
|
58
50
|
|
51
|
+
The last step is to install the `wd` bash function, which enables the `cd`-like behavior.
|
52
|
+
Choose
|
59
53
|
$ warp-dir install [ --dotfile <file> ]
|
60
54
|
|
61
|
-
And after that you need to restart your
|
62
|
-
|
55
|
+
And after that you need to restart your shell, and then you should get the command's
|
56
|
+
"help" message by typing:
|
63
57
|
|
64
58
|
$ wd help
|
65
59
|
|
@@ -72,9 +66,9 @@ The usage of the tool is derived from `ZSH`-based inspiration. If it ain't broke
|
|
72
66
|
I like how `wd` can be used with very short warp points, so it's so much less typing. I often name
|
73
67
|
my points `pu` so that I can jump there with `wd pu`.
|
74
68
|
|
75
|
-
Unlike ZSH counterpart, this tool includes full command line parsing, so
|
69
|
+
Unlike ZSH counterpart, this tool includes full command line parsing, so
|
76
70
|
you can (if you want to) use flags to achieve the same effect with more
|
77
|
-
characters to type, for example all below commands do the same thing.
|
71
|
+
characters to type, for example all below commands do the same thing.
|
78
72
|
|
79
73
|
```bash
|
80
74
|
wd pu
|
@@ -85,7 +79,7 @@ characters to type, for example all below commands do the same thing.
|
|
85
79
|
You can run a comman in the target directory without leaving the current via
|
86
80
|
`wd ls pu`, but in this implementation you can also pass arguments to `ls` after
|
87
81
|
the `--` in argument list, for example, to run `ls -1` I would do `wd ls pu -- -1`.
|
88
|
-
|
82
|
+
|
89
83
|
Here is a full command / help summary.
|
90
84
|
|
91
85
|
![Image](doc/wd-help.png)
|
@@ -96,13 +90,13 @@ Here is a full command / help summary.
|
|
96
90
|
|
97
91
|
These features will be added shortly:
|
98
92
|
|
99
|
-
* for now `wd clean` is not supported
|
93
|
+
* for now `wd clean` is not supported
|
100
94
|
* for now history is not supported
|
101
95
|
* for now '-' is not supported
|
102
|
-
|
96
|
+
|
103
97
|
## Future Development
|
104
98
|
|
105
|
-
I have so many cool ideas about where this can go, that I created a
|
99
|
+
I have so many cool ideas about where this can go, that I created a
|
106
100
|
[dedicated page](ROADMAP.md) for the discussion of future features. Please head over
|
107
101
|
there if you'ld like to participate.
|
108
102
|
|
data/Rakefile
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
task :
|
2
|
-
|
1
|
+
task :reinstall do
|
3
2
|
[ %q(chmod -R o+r .),
|
4
3
|
%q(rm -f *.gem),
|
5
4
|
%q(rm -rf build),
|
@@ -20,10 +19,42 @@ task :install do
|
|
20
19
|
EOF
|
21
20
|
end
|
22
21
|
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
namespace :gemfile do
|
23
|
+
desc 'Install dependencies by creating a temporary Gemfile'
|
24
|
+
task :install => [:setup, :cleanup]
|
25
|
+
|
26
|
+
task :setup do
|
27
|
+
sh %q{
|
28
|
+
echo "source 'https://rubygems.org'; gemspec" > Gemfile
|
29
|
+
[[ -n $(which bundle) ]] || gem install bundler --no-ri --no-rdoc
|
30
|
+
bundle install
|
31
|
+
}.gsub(%r{^\s+}m, '')
|
32
|
+
end
|
33
|
+
|
34
|
+
task :cleanup do
|
35
|
+
sh %q{ rm -f Gemfile }
|
36
|
+
end
|
26
37
|
|
38
|
+
namespace :bundler do
|
39
|
+
task :load do
|
40
|
+
require 'bundler'
|
41
|
+
require 'bundler/gem_tasks'
|
42
|
+
end
|
43
|
+
desc "Invoke Bundler's 'release' task to push the gem to RubyGems.org"
|
44
|
+
task :release => [ :setup, :load ] do
|
45
|
+
Rake::Task["release"].invoke
|
46
|
+
Rake::Task["gemfile:cleanup"].invoke
|
47
|
+
end
|
48
|
+
|
49
|
+
desc "Installs and invokes Bundler's 'release' task"
|
50
|
+
task :install => [ :setup, :load ] do
|
51
|
+
Rake::Task["install:local"].invoke
|
52
|
+
Rake::Task["gemfile:cleanup"].invoke
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
require 'rake/clean'
|
27
58
|
CLEAN.include %w(pkg coverage *.gem)
|
28
59
|
|
29
60
|
begin
|
data/bin/console
CHANGED
data/lib/warp/dir.rb
CHANGED
@@ -4,8 +4,8 @@ module Warp
|
|
4
4
|
|
5
5
|
module Dir
|
6
6
|
# tried in order.
|
7
|
-
DOTFILES = %w(
|
8
|
-
|
7
|
+
DOTFILES = %w(.bash_profile .bashrc .profile .bash_login).map{|f| "~/#{f}" }
|
8
|
+
DOTFILE_CREATED='.bash_profile'
|
9
9
|
SHELL_WRAPPER = "#{PROJECT_HOME}/bin/warp-dir.bash"
|
10
10
|
|
11
11
|
class << self
|
@@ -64,4 +64,3 @@ class Object
|
|
64
64
|
self.eql?('') || self.nil?
|
65
65
|
end
|
66
66
|
end
|
67
|
-
|
data/lib/warp/dir/command/ls.rb
CHANGED
data/lib/warp/dir/version.rb
CHANGED
data/warp-dir.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.required_ruby_version = '>= 2.0.0'
|
24
24
|
s.required_rubygems_version = '>= 1.3.6'
|
25
25
|
|
26
|
-
s.
|
26
|
+
s.add_runtime_dependency('slop', '~> 4.2')
|
27
27
|
|
28
28
|
s.add_development_dependency 'codeclimate-test-reporter', '~> 0.5'
|
29
29
|
s.add_development_dependency 'bundler', '~> 1.11'
|
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.1.
|
4
|
+
version: 1.1.5
|
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-03-
|
11
|
+
date: 2016-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slop
|
@@ -101,14 +101,12 @@ files:
|
|
101
101
|
- ".rspec"
|
102
102
|
- ".rubocop.yml"
|
103
103
|
- ".travis.yml"
|
104
|
-
- Gemfile
|
105
104
|
- Guardfile
|
106
105
|
- LICENSE
|
107
106
|
- README.md
|
108
107
|
- ROADMAP.md
|
109
108
|
- Rakefile
|
110
109
|
- bin/console
|
111
|
-
- bin/setup
|
112
110
|
- bin/warp-dir.bash
|
113
111
|
- exe/warp-dir
|
114
112
|
- lib/colored.rb
|
data/Gemfile
DELETED