aliasify 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -8
- data/lib/aliasify.rb +5 -1
- data/lib/aliasify/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbb1bc46ee7462c3246968804a803193d5d008df
|
4
|
+
data.tar.gz: ba1d7a6dd1bc26919fec7c9d1d18fc5eed26fb6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 352cfc1357a34ac94032e1af577ec430924000da258513bac94d9118c4279d6ad788cd26c72e4d4a85922e9cb77092f8155442ed5a6483afd36bec9891ebcd1b
|
7
|
+
data.tar.gz: 3908395f9aaf27460ea9c276e32ce99fb95ce6bb301e982084a93f2db179bab3c45794238a33e4ff3de8805264401ba6d37dfa11bb788c1b6f2e932efc514196
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# Aliasify
|
2
2
|
|
3
|
-
|
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
|
-
|
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
|
-
|
25
|
+
$ aliasify <insert-alias-name-you'd-like-here>
|
30
26
|
|
31
|
-
|
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
|
|
data/lib/aliasify.rb
CHANGED
@@ -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
|
-
|
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
|
|
data/lib/aliasify/version.rb
CHANGED