jump 0.3.3 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 45cc11019d9e5241cd128a792b688a45af57f348
4
- data.tar.gz: 9398823d3dcb0c0afe2a89714056aa63bd3526b2
3
+ metadata.gz: 4e00254a344acd97f339b9fa1266092570eb9d85
4
+ data.tar.gz: 156c44b7690aaf5aa6fa9a70f7648be6bc7444de
5
5
  SHA512:
6
- metadata.gz: 4da2d885cde0c2b1572f00c9a7c282221e7999614155022606d12e71d7d4fc8bca8dbe93f34c94c8b2aeb512c0c437f1cded4d23b9610cd452299ebdefaac422
7
- data.tar.gz: 5fa7e95fcc5b2712d1e8fe6af4ba751782ac74e320a5a47e148d9a63b78fe813b05613655343c71404859a78ce1ee658594044a31a665a509e694407ad011d41
6
+ metadata.gz: 81d5d64297ecdfa4a6fef936ddd49b4ab1a19c655192188cfeaabf53edefa1f71c7eb0c4c143e145209541ef375528a2906823e4cf87d56af37ae946e29143eb
7
+ data.tar.gz: a4702ec5d42f5db65340093435810a1e9ca9f3814e7aef4dc03bd9da6bccca9097c713c0483dd8e3f1b7c4c58b903c90e974c5670ea0e3850ed98571316337e4
data/Changelog CHANGED
@@ -1,3 +1,9 @@
1
+ Wed Jan 21 14:32:36 CET 2015 Flavio Castelli <flavio@castelli.name>
2
+
3
+ Version 0.4.0:
4
+ * Added "--path" flag: this makes possible new creative uses of
5
+ jump like: "vim `jump -p rails-app/README`".
6
+
1
7
  Mon Jan 12 12:25:15 CET 2015 Flavio Castelli <flavio@castelli.name>
2
8
 
3
9
  Version 0.3.3:
data/README.rdoc CHANGED
@@ -31,6 +31,10 @@ To delete a bookmark you don't need anymore, use the `del` command:
31
31
 
32
32
  $ jump --del myproject
33
33
 
34
+ To show the path to a bookmark, use the `path` command:
35
+
36
+ $ jump --path myproject
37
+
34
38
  Don't remember a command? Just type:
35
39
 
36
40
  $ jump --help
@@ -74,6 +78,13 @@ Hence
74
78
  is automatically expanded to
75
79
  $ rails-app/log
76
80
 
81
+ jump also allows users to print out the path of a bookmark. This adds a flavor of
82
+ new commands in conjunction to jump. For example, jump allows a user to execute
83
+ the following commands:
84
+ $ ls `jump -p rails-app`
85
+ $ cp `jump -p rails-app/Rakefile` .
86
+ $ vim `jump -p rails-app/README`
87
+
77
88
  The advanced completion works out of the box for zsh users.
78
89
  The bash shell relies on bash_completion.
79
90
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.3
1
+ 0.4.0
@@ -26,7 +26,7 @@ _jump()
26
26
  prev="${COMP_WORDS[COMP_CWORD-1]}"
27
27
  opts="--help -h --add -a --del -d --list -l"
28
28
 
29
- if [[ ${prev} == "-d" || ${prev} == "--del" ]] ; then
29
+ if [[ ${prev} == "-d" || ${prev} == "--del" || ${prev} == "-p" || ${prev} == "--path" ]] ; then
30
30
  # complete the del command with a list of the available bookmarks
31
31
  local bookmarks=$(jump --complete)
32
32
  COMPREPLY=( $(compgen -W "${bookmarks}" -- ${cur}) )
data/bin/jump-bin CHANGED
@@ -43,6 +43,10 @@ begin
43
43
  options[:list] = true
44
44
  end
45
45
 
46
+ opts.on("-p", "--path", "Prints the path of the bookmark") do |v|
47
+ options[:path] = v
48
+ end
49
+
46
50
  opts.on("--bash-integration", "Prints the path to directory containing the Bash integration files") do
47
51
  puts "#{File.dirname(THIS_FILE)}/../bash_integration"
48
52
  exit
data/zsh_integration/jump CHANGED
@@ -29,7 +29,7 @@ _jump()
29
29
  prev="${user_input[$#user_input-1]}"
30
30
  fi
31
31
 
32
- if [[ ${prev} = "-d" || ${prev} = "--del" ]] ; then
32
+ if [[ ${prev} = "-p" || ${prev} = "--path" || ${prev} = "-d" || ${prev} = "--del" ]] ; then
33
33
  # complete the del command with a list of the available bookmarks
34
34
  reply=( $(jump-bin --complete) )
35
35
  return 0
@@ -47,11 +47,13 @@ _jump()
47
47
  function jump {
48
48
  local args dest
49
49
  args=$*
50
- #echo "jump called with |$args|"
51
50
  if [[ $#args -lt 1 ]]; then
52
51
  jump-bin --help
53
52
  elif [[ ${args[0,1]} = "-" ]]; then
53
+ # Case when --list is passed in
54
54
  jump-bin $*
55
+ elif [[ ${args[0,2]} = "-p" || ${args[0,6]} = "--path" ]]; then
56
+ dest="$(jump-bin $*)"
55
57
  else
56
58
  dest="$(jump-bin $*)" && cd "$dest"
57
59
  fi
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jump
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flavio Castelli
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-01-12 00:00:00.000000000 Z
12
+ date: 2015-01-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake