aka 0.5.8 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +11 -7
- data/lib/aka.rb +9 -2
- data/lib/aka/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -26,12 +26,16 @@ Or you can use `aka`.
|
|
26
26
|
|
27
27
|
## Usage
|
28
28
|
|
29
|
-
1.
|
30
|
-
2.
|
31
|
-
3.
|
32
|
-
4.
|
33
|
-
1. Enjoy having your command line say `hi there` back to you
|
34
|
-
5.
|
29
|
+
1. Add the line `source ~/.alias` to your `.bash_profile` or `.profile` or `.zshrc`… basically whatever profile file you use on your system.
|
30
|
+
2. Run `aka -a hi "echo Hi There!"`
|
31
|
+
3. Type `source ~/.alias` to reload the aliases in your current session (or restart your session)
|
32
|
+
4. Type `hi`
|
33
|
+
1. Enjoy having your command line say `hi there` back to you.
|
34
|
+
5. Run `aka -h` to see a full list of features.
|
35
|
+
6. Decide that you want to create a *useful* alias now.
|
36
|
+
7. Run `aka -a aload "source ~/.alias".
|
37
|
+
8. Manually reload your alias file for the last time by typing `source ~/.alias` at the command prompt.
|
38
|
+
9. From now on, whenever you make changes to the alias file you can simply type `aload` at the command prompt and your new aliases will be ready for you.
|
35
39
|
|
36
40
|
|
37
41
|
**Quick note:** Mostly for my own peace of mind, running `aka -d` creates a backup copy of your alias file as `.alias.bak` before cleaning out your current alias file. So if you really want to get rid of any sign of your aliases you'll need to manually delete that file as well.
|
@@ -48,7 +52,7 @@ Many, many thanks go to [David Copeland] for the [Methadone] framework that made
|
|
48
52
|
|
49
53
|
I really like this app, but I've got other things I want to work on. But there are a few features I'm still planning to add:
|
50
54
|
|
51
|
-
1. Support for a config file that will let you use a file other than `~/.alias` for your aliases
|
55
|
+
1. Support for a config file that will let you use a file other than `~/.alias` for your aliases. -**DONE!**
|
52
56
|
1. Grouping aliases
|
53
57
|
1. Aliases sorted alphabetically by default. -**DONE!**
|
54
58
|
|
data/lib/aka.rb
CHANGED
@@ -57,8 +57,15 @@ module Aka
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def showAll
|
60
|
-
|
61
|
-
|
60
|
+
# A whole bunch of rigamarole to make all the line items the same width.
|
61
|
+
length = 0
|
62
|
+
@aliases.keys.each do |k|
|
63
|
+
length = k.length if k.length > length
|
64
|
+
end
|
65
|
+
eq_string = "=" * (length + 7) #7 is the length of the string ": Value"
|
66
|
+
length = length * -1
|
67
|
+
keyList = sprintf("\n\n%1$*2$s: %3$s\n%4$s\n","Alias",length,"Value",eq_string)
|
68
|
+
@aliases.each{|key, value| keyList = keyList + sprintf("%1$*2$s: %3$s\n",key, length, value)}
|
62
69
|
info keyList
|
63
70
|
end
|
64
71
|
|
data/lib/aka/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rdoc
|