aliasify 0.1.2 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f96f181e063ac19650a01a117c676a2edbf990f7
4
- data.tar.gz: af6041456de71b0eb61284e3128b465f046fdea5
3
+ metadata.gz: bbb1bc46ee7462c3246968804a803193d5d008df
4
+ data.tar.gz: ba1d7a6dd1bc26919fec7c9d1d18fc5eed26fb6b
5
5
  SHA512:
6
- metadata.gz: 3d78fa4b5a90fa53bc62160a294386410e9ed5e99384f849e61a4de24f8ea18e852548f1b58b3ce132596cd615cb0f08e304e571c9fbc3054fefa22d0895fc3f
7
- data.tar.gz: a47874bc306660cab6c8152b97e61d08bd1e56f3e1948b7fdb7cd3491ec220b824158273912549cf299ebdc4431f11f2f2ccb8995edde4370b18aea32f038905
6
+ metadata.gz: 352cfc1357a34ac94032e1af577ec430924000da258513bac94d9118c4279d6ad788cd26c72e4d4a85922e9cb77092f8155442ed5a6483afd36bec9891ebcd1b
7
+ data.tar.gz: 3908395f9aaf27460ea9c276e32ce99fb95ce6bb301e982084a93f2db179bab3c45794238a33e4ff3de8805264401ba6d37dfa11bb788c1b6f2e932efc514196
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Aliasify
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/aliasify`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Isn't it annoying when you have to spell out the full path to projects that you often work on? I like setting up aliases to project directories. It's kinda annoying though to run `pwd` and then redirecting that to `.bash_aliases` or whatever and then manually adding an alias. So I wrote aliasify.
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,13 +20,11 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
26
-
27
- ## Development
23
+ Once the gem is installed (and you've run `rbenv rehash`...), go to your oft-used project directory. Now, run
28
24
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
25
+ $ aliasify <insert-alias-name-you'd-like-here>
30
26
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
27
+ For example, I used to work on [PrettyPrintGmail](https://github.com/ShivanKaul/PrettyPrintGmail) a lot at one point. So I would set up something like: `aliasify pp`. Then on start-up I could type in `pp` and be taken directly to the directory.
32
28
 
33
29
  ## Contributing
34
30
 
@@ -31,7 +31,11 @@ module Aliasify
31
31
  File.open("#{Dir.home}/#{filename}", 'a') do |file|
32
32
  file.puts @@toAdd
33
33
  puts green("[aliasify]") + " Found " + yellow("#{filename}")
34
- print green("[aliasify]") + " Success! Now, run `" + green("source ~/#{filename}") + "` to make the alias functional. Then, go to the current directory from wherever by simply typing in `" + green("#{@@shortcut}") + "`."
34
+ system %{
35
+ source ~/#{filename}
36
+ shopt -s expand_aliases
37
+ }
38
+ print green("[aliasify]") + " Alias successfully added! Now you can go to the current directory from wherever by simply typing in `" + green("#{@@shortcut}") + "`."
35
39
  end
36
40
  end
37
41
 
@@ -1,3 +1,3 @@
1
1
  module Aliasify
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aliasify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ShivanKaul