hsume2-aka 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/.ruby-version +1 -0
  4. data/.travis.yml +4 -0
  5. data/Gemfile +8 -0
  6. data/Guardfile +9 -0
  7. data/LICENSE.txt +7 -0
  8. data/README.md +91 -0
  9. data/Rakefile +98 -0
  10. data/aka.gemspec +28 -0
  11. data/bin/aka +5 -0
  12. data/features/aka/add.feature +183 -0
  13. data/features/aka/edit.feature +91 -0
  14. data/features/aka/generate.feature +117 -0
  15. data/features/aka/help.feature +80 -0
  16. data/features/aka/list.feature +62 -0
  17. data/features/aka/remove.feature +48 -0
  18. data/features/aka/show.feature +38 -0
  19. data/features/step_definitions/aka_steps.rb +3 -0
  20. data/features/support/env.rb +80 -0
  21. data/lib/aka/app.rb +66 -0
  22. data/lib/aka/man/aka-add.1 +34 -0
  23. data/lib/aka/man/aka-add.1.txt +31 -0
  24. data/lib/aka/man/aka-edit.1 +96 -0
  25. data/lib/aka/man/aka-edit.1.txt +75 -0
  26. data/lib/aka/man/aka-generate.1 +81 -0
  27. data/lib/aka/man/aka-generate.1.txt +70 -0
  28. data/lib/aka/man/aka-list.1 +71 -0
  29. data/lib/aka/man/aka-list.1.txt +63 -0
  30. data/lib/aka/man/aka-remove.1 +30 -0
  31. data/lib/aka/man/aka-remove.1.txt +29 -0
  32. data/lib/aka/man/aka-show.1 +33 -0
  33. data/lib/aka/man/aka-show.1.txt +31 -0
  34. data/lib/aka/man/aka.7 +169 -0
  35. data/lib/aka/man/aka.7.txt +121 -0
  36. data/lib/aka/store.rb +372 -0
  37. data/lib/aka/version.rb +3 -0
  38. data/lib/aka.rb +6 -0
  39. data/man/aka-add.1.ronn +32 -0
  40. data/man/aka-edit.1.ronn +67 -0
  41. data/man/aka-generate.1.ronn +51 -0
  42. data/man/aka-list.1.ronn +51 -0
  43. data/man/aka-remove.1.ronn +21 -0
  44. data/man/aka-show.1.ronn +27 -0
  45. data/man/aka.7.ronn +85 -0
  46. data/test/tc_something.rb +7 -0
  47. metadata +184 -0
@@ -0,0 +1,70 @@
1
+ AKA-GENERATE(1) AKA-GENERATE(1)
2
+
3
+
4
+
5
+ NAME
6
+ aka-generate - Generate commands for loading keyboard shortcuts into
7
+ your shell
8
+
9
+ SYNOPSIS
10
+ aka generate [-t tag1[,tag2...]] [-o output]
11
+
12
+ DESCRIPTION
13
+ This command generates commands for loading keyboard shortcuts in
14
+ aka(7) into your shell.
15
+
16
+ This command can be performed with or without tag filtering.
17
+
18
+ By default, the commands are generated to STDOUT.
19
+
20
+ OPTIONS
21
+ -t tag1[,tag2...]
22
+ A comma-separated list of tags to filter with. Shortcuts tagged
23
+ with tag1[,tag2...] will be included. Shortcuts tagged with
24
+ other tags are excluded. Shortcuts with no tags are always
25
+ included.
26
+
27
+ -o <output>
28
+ The location to generate the commands to.
29
+
30
+ EXAMPLES
31
+ Generate for all shortcuts:
32
+
33
+
34
+
35
+ $ aka generate
36
+ alias ..="cd .."
37
+ alias ls="ls -FG"
38
+ function ls {
39
+ ls -F --color=auto
40
+ }
41
+
42
+
43
+
44
+ Generate for shortcuts matching --tag os:darwin:
45
+
46
+
47
+
48
+ $ aka generate -t os:darwin
49
+ alias ..="cd .."
50
+ alias ls="ls -FG"
51
+
52
+ 2 shortcut(s) excluded (#os:linux, #os:windows).
53
+
54
+
55
+
56
+ Generate to file:
57
+
58
+
59
+
60
+ $ aka generate -o ~/.aka.zsh
61
+ Generated ~/.aka.zsh.
62
+
63
+
64
+
65
+ SEE ALSO
66
+ aka(7), aka-show(1)
67
+
68
+
69
+
70
+ February 2014 AKA-GENERATE(1)
@@ -0,0 +1,71 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "AKA\-LIST" "1" "February 2014" "" ""
5
+ .
6
+ .SH "NAME"
7
+ \fBaka\-list\fR \- List keyboard shortcuts
8
+ .
9
+ .SH "SYNOPSIS"
10
+ \fBaka list\fR [\fB\-t\fR \fItag1\fR[,\fItag2\fR\.\.\.]]
11
+ .
12
+ .SH "DESCRIPTION"
13
+ This command lists keyboard shortcuts in \fBaka(7)\fR\.
14
+ .
15
+ .P
16
+ This command can be performed with or without tag filtering\.
17
+ .
18
+ .SH "OPTIONS"
19
+ .
20
+ .TP
21
+ \fB\-t\fR \fItag1\fR[,\fItag2\fR\.\.\.]
22
+ A comma\-separated list of tags to filter with\. Shortcuts tagged with \fItag1\fR[,\fItag2\fR\.\.\.] will be included\. Shortcuts tagged with other tags are excluded\. Shortcuts with no tags are always included\.
23
+ .
24
+ .SH "EXAMPLES"
25
+ List all shortcuts:
26
+ .
27
+ .IP "" 4
28
+ .
29
+ .nf
30
+
31
+ $ aka list
32
+ #default
33
+ ========
34
+ \.\. cd \.\.
35
+
36
+ #os:linux
37
+ =========
38
+ ls ls; ls; ls
39
+
40
+ #os:darwin
41
+ ==========
42
+ ls ls \-FG
43
+ .
44
+ .fi
45
+ .
46
+ .IP "" 0
47
+ .
48
+ .P
49
+ List shortcuts matching \fB\-\-tag os:darwin\fR:
50
+ .
51
+ .IP "" 4
52
+ .
53
+ .nf
54
+
55
+ $ aka list \-t os:darwin
56
+ #default
57
+ ========
58
+ \.\. cd \.\.
59
+
60
+ #os:darwin
61
+ ==========
62
+ ls ls \-FG
63
+
64
+ 2 shortcut(s) excluded (#os:linux, #os:windows)\.
65
+ .
66
+ .fi
67
+ .
68
+ .IP "" 0
69
+ .
70
+ .SH "SEE ALSO"
71
+ \fBaka(7)\fR, \fBaka\-show(1)\fR
@@ -0,0 +1,63 @@
1
+ AKA-LIST(1) AKA-LIST(1)
2
+
3
+
4
+
5
+ NAME
6
+ aka-list - List keyboard shortcuts
7
+
8
+ SYNOPSIS
9
+ aka list [-t tag1[,tag2...]]
10
+
11
+ DESCRIPTION
12
+ This command lists keyboard shortcuts in aka(7).
13
+
14
+ This command can be performed with or without tag filtering.
15
+
16
+ OPTIONS
17
+ -t tag1[,tag2...]
18
+ A comma-separated list of tags to filter with. Shortcuts tagged
19
+ with tag1[,tag2...] will be included. Shortcuts tagged with
20
+ other tags are excluded. Shortcuts with no tags are always
21
+ included.
22
+
23
+ EXAMPLES
24
+ List all shortcuts:
25
+
26
+
27
+
28
+ $ aka list
29
+ #default
30
+ ========
31
+
32
+ #os:linux
33
+ =========
34
+ ls ls; ls; ls
35
+
36
+ #os:darwin
37
+ ==========
38
+ ls ls -FG
39
+
40
+
41
+
42
+ List shortcuts matching --tag os:darwin:
43
+
44
+
45
+
46
+ $ aka list -t os:darwin
47
+ #default
48
+ ========
49
+
50
+ #os:darwin
51
+ ==========
52
+ ls ls -FG
53
+
54
+ 2 shortcut(s) excluded (#os:linux, #os:windows).
55
+
56
+
57
+
58
+ SEE ALSO
59
+ aka(7), aka-show(1)
60
+
61
+
62
+
63
+ February 2014 AKA-LIST(1)
@@ -0,0 +1,30 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "AKA\-REMOVE" "1" "February 2014" "" ""
5
+ .
6
+ .SH "NAME"
7
+ \fBaka\-remove\fR \- Remove keyboard shortcuts
8
+ .
9
+ .SH "SYNOPSIS"
10
+ \fBaka remove\fR \fIshortcut\fR
11
+ .
12
+ .SH "DESCRIPTION"
13
+ This command removes a keyboard shortcut from \fBaka(7)\fR\.
14
+ .
15
+ .SH "EXAMPLES"
16
+ Remove a shortcut:
17
+ .
18
+ .IP "" 4
19
+ .
20
+ .nf
21
+
22
+ $ aka remove ls
23
+ Removed shortcut\.
24
+ .
25
+ .fi
26
+ .
27
+ .IP "" 0
28
+ .
29
+ .SH "SEE ALSO"
30
+ \fBaka(7)\fR, \fBaka\-show(1)\fR
@@ -0,0 +1,29 @@
1
+ AKA-REMOVE(1) AKA-REMOVE(1)
2
+
3
+
4
+
5
+ NAME
6
+ aka-remove - Remove keyboard shortcuts
7
+
8
+ SYNOPSIS
9
+ aka remove shortcut
10
+
11
+ DESCRIPTION
12
+ This command removes a keyboard shortcut from aka(7).
13
+
14
+ EXAMPLES
15
+ Remove a shortcut:
16
+
17
+
18
+
19
+ $ aka remove ls
20
+ Removed shortcut.
21
+
22
+
23
+
24
+ SEE ALSO
25
+ aka(7), aka-show(1)
26
+
27
+
28
+
29
+ February 2014 AKA-REMOVE(1)
@@ -0,0 +1,33 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "AKA\-SHOW" "1" "February 2014" "" ""
5
+ .
6
+ .SH "NAME"
7
+ \fBaka\-show\fR \- Show keyboard shortcuts
8
+ .
9
+ .SH "SYNOPSIS"
10
+ \fBaka show\fR \fIshortcut\fR
11
+ .
12
+ .SH "DESCRIPTION"
13
+ This command show a keyboard shortcut in \fBaka(7)\fR\.
14
+ .
15
+ .SH "EXAMPLES"
16
+ .
17
+ .nf
18
+
19
+ $ aka add psf "ps aux | grep $@" \-\-function
20
+ Created shortcut\.
21
+ $ aka show psf
22
+ Keyword: psf
23
+ Description:
24
+
25
+ Function: y
26
+ Tags:
27
+ Script:
28
+ ps aux | grep $@
29
+ .
30
+ .fi
31
+ .
32
+ .SH "SEE ALSO"
33
+ \fBaka(7)\fR, \fBaka\-add(1)\fR
@@ -0,0 +1,31 @@
1
+ AKA-SHOW(1) AKA-SHOW(1)
2
+
3
+
4
+
5
+ NAME
6
+ aka-show - Show keyboard shortcuts
7
+
8
+ SYNOPSIS
9
+ aka show shortcut
10
+
11
+ DESCRIPTION
12
+ This command show a keyboard shortcut in aka(7).
13
+
14
+ EXAMPLES
15
+ $ aka add psf "ps aux | grep $@" --function
16
+ Created shortcut.
17
+ $ aka show psf
18
+ Keyword: psf
19
+ Description:
20
+
21
+ Function: y
22
+ Tags:
23
+ Script:
24
+ ps aux | grep $@
25
+
26
+ SEE ALSO
27
+ aka(7), aka-add(1)
28
+
29
+
30
+
31
+ February 2014 AKA-SHOW(1)
data/lib/aka/man/aka.7 ADDED
@@ -0,0 +1,169 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "AKA" "7" "February 2014" "" ""
5
+ .
6
+ .SH "NAME"
7
+ \fBaka\fR \- Manage Shell Keyboard Shortcuts
8
+ .
9
+ .SH "SYNOPSIS"
10
+ \fBaka\fR add \fIshortcut\fR \fIcommand\fR [options]
11
+ .
12
+ .br
13
+ \fBaka\fR show \fIshortcut\fR [options]
14
+ .
15
+ .br
16
+ \fBaka\fR edit \fIshortcut\fR [options]
17
+ .
18
+ .br
19
+ \fBaka\fR remove \fIshortcut\fR
20
+ .
21
+ .br
22
+ \fBaka\fR list [options]
23
+ .
24
+ .br
25
+ \fBaka\fR generate [options]
26
+ .
27
+ .SH "DESCRIPTION"
28
+ \fBaka\fR is an easy way to manage keyboard shortcuts in UNIX shells\.
29
+ .
30
+ .P
31
+ You can replace commonly used commands with shorter, sexier keyboard shortcuts and, ultimately, improve your productivity!
32
+ .
33
+ .P
34
+ With \fBaka\fR, you can add, show, edit, remove, list keyboard shortcuts\. On top of that you can tag shortcuts based on environment, tool, context, etc\. Then, you can generate an appropriate output file for your environment\.
35
+ .
36
+ .SH "OPTIONS"
37
+ .
38
+ .TP
39
+ \fB\-\-help\fR:
40
+ .
41
+ .br
42
+ Show help info
43
+
44
+ .
45
+ .TP
46
+ \fB\-\-version\fR:
47
+ .
48
+ .br
49
+ Show version info
50
+
51
+ .
52
+ .TP
53
+ \fB\-\-log\-level=<debug|info|warn|error|fatal>\fR:
54
+ .
55
+ .br
56
+ Set the logging level (Default: info)
57
+
58
+ .
59
+ .SH "EXAMPLES"
60
+ Add a keyboard shortcut and generate the output script:
61
+ .
62
+ .IP "" 4
63
+ .
64
+ .nf
65
+
66
+ $ aka add ls "ls \-F \-\-color=auto"
67
+ Created shortcut\.
68
+ $ aka generate
69
+ alias ls="ls \-F \-\-color=auto"
70
+ .
71
+ .fi
72
+ .
73
+ .IP "" 0
74
+ .
75
+ .P
76
+ Add a keyboard shortcut for a bash/zsh function:
77
+ .
78
+ .IP "" 4
79
+ .
80
+ .nf
81
+
82
+ $ aka add psf "ps aux | grep $@" \-\-function
83
+ Created shortcut\.
84
+ $ aka generate
85
+ function psf {
86
+ ps aux | grep $@
87
+ }
88
+ .
89
+ .fi
90
+ .
91
+ .IP "" 0
92
+ .
93
+ .P
94
+ Generate to a file instead:
95
+ .
96
+ .IP "" 4
97
+ .
98
+ .nf
99
+
100
+ $ aka generate \-o ~/\.aka\.zsh
101
+ Generated ~/\.aka\.zsh\.
102
+ .
103
+ .fi
104
+ .
105
+ .IP "" 0
106
+ .
107
+ .P
108
+ Tag a shortcut and generate for OS X:
109
+ .
110
+ .IP "" 4
111
+ .
112
+ .nf
113
+
114
+ $ aka add ls "ls \-F \-\-color=auto" \-\-tag os:linux
115
+ Created shortcut\.
116
+ $ aka add ls "ls \-FG" \-\-tag os:darwin
117
+ Created shortcut\.
118
+ $ aka generate \-\-tag os:darwin
119
+ alias ls="ls \-FG"
120
+ .
121
+ .fi
122
+ .
123
+ .IP "" 0
124
+ .
125
+ .P
126
+ Edit a shortcut:
127
+ .
128
+ .IP "" 4
129
+ .
130
+ .nf
131
+
132
+ $ aka edit ls "ls \-F \-\-color=auto" \-\-tag os:linux
133
+ 1 Shortcut: ls
134
+ 2 Description:
135
+ 3
136
+ 4 Function (y/n): n
137
+ 5 Tags: os:linux
138
+ 6 Command:
139
+ 7 ls \-FG
140
+ /var/folders/rj/8bjyj6x92l9bxykxc_ljyqsc0000gp/T/shortcut20140222\-63006\-13csxr0" 7L, 87C
141
+ $ :wq
142
+ .
143
+ .fi
144
+ .
145
+ .IP "" 0
146
+ .
147
+ .P
148
+ Remove a shortcut:
149
+ .
150
+ .IP "" 4
151
+ .
152
+ .nf
153
+
154
+ $ aka remove ls
155
+ Removes shortcut\.
156
+ .
157
+ .fi
158
+ .
159
+ .IP "" 0
160
+ .
161
+ .SH "ENVIRONMENT"
162
+ .
163
+ .TP
164
+ \fBAKA\fR:
165
+ .
166
+ .br
167
+ The file where \fBaka\fR stores everything\. Default: ~/\.aka\.yml
168
+
169
+
@@ -0,0 +1,121 @@
1
+ AKA(7) AKA(7)
2
+
3
+
4
+
5
+ NAME
6
+ aka - Manage Shell Keyboard Shortcuts
7
+
8
+ SYNOPSIS
9
+ aka add shortcut command [options]
10
+ aka show shortcut [options]
11
+ aka edit shortcut [options]
12
+ aka remove shortcut
13
+ aka list [options]
14
+ aka generate [options]
15
+
16
+ DESCRIPTION
17
+ aka is an easy way to manage keyboard shortcuts in UNIX shells.
18
+
19
+ You can replace commonly used commands with shorter, sexier keyboard
20
+ shortcuts and, ultimately, improve your productivity!
21
+
22
+ With aka, you can add, show, edit, remove, list keyboard shortcuts. On
23
+ top of that you can tag shortcuts based on environment, tool, context,
24
+ etc. Then, you can generate an appropriate output file for your envi-
25
+ ronment.
26
+
27
+ OPTIONS
28
+ --help:
29
+ Show help info
30
+
31
+
32
+ --version:
33
+ Show version info
34
+
35
+
36
+ --log-level=<debug|info|warn|error|fatal>:
37
+ Set the logging level (Default: info)
38
+
39
+
40
+ EXAMPLES
41
+ Add a keyboard shortcut and generate the output script:
42
+
43
+
44
+
45
+ $ aka add ls "ls -F --color=auto"
46
+ Created shortcut.
47
+ $ aka generate
48
+ alias ls="ls -F --color=auto"
49
+
50
+
51
+
52
+ Add a keyboard shortcut for a bash/zsh function:
53
+
54
+
55
+
56
+ $ aka add psf "ps aux | grep $@" --function
57
+ Created shortcut.
58
+ $ aka generate
59
+ function psf {
60
+ ps aux | grep $@
61
+ }
62
+
63
+
64
+
65
+ Generate to a file instead:
66
+
67
+
68
+
69
+ $ aka generate -o ~/.aka.zsh
70
+ Generated ~/.aka.zsh.
71
+
72
+
73
+
74
+ Tag a shortcut and generate for OS X:
75
+
76
+
77
+
78
+ $ aka add ls "ls -F --color=auto" --tag os:linux
79
+ Created shortcut.
80
+ $ aka add ls "ls -FG" --tag os:darwin
81
+ Created shortcut.
82
+ $ aka generate --tag os:darwin
83
+ alias ls="ls -FG"
84
+
85
+
86
+
87
+ Edit a shortcut:
88
+
89
+
90
+
91
+ $ aka edit ls "ls -F --color=auto" --tag os:linux
92
+ 1 Shortcut: ls
93
+ 2 Description:
94
+ 3
95
+ 4 Function (y/n): n
96
+ 5 Tags: os:linux
97
+ 6 Command:
98
+ 7 ls -FG
99
+ /var/folders/rj/8bjyj6x92l9bxykxc_ljyqsc0000gp/T/shortcut20140222-63006-13csxr0" 7L, 87C
100
+ $ :wq
101
+
102
+
103
+
104
+ Remove a shortcut:
105
+
106
+
107
+
108
+ $ aka remove ls
109
+ Removes shortcut.
110
+
111
+
112
+
113
+ ENVIRONMENT
114
+ AKA:
115
+ The file where aka stores everything. Default: ~/.aka.yml
116
+
117
+
118
+
119
+
120
+
121
+ February 2014 AKA(7)