hsume2-aka 0.1.0

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.
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,80 @@
1
+ Feature: Help with aka
2
+ In order to learn how to use aka
3
+ I want to view help info in the command-line
4
+ So I don't have to scour the web for information
5
+
6
+ Background:
7
+ Given I set the environment variables to:
8
+ | variable | value |
9
+ | NO_MAN | 1 |
10
+
11
+ Scenario: Run aka
12
+ When I run `aka`
13
+ Then the exit status should be 0
14
+ And the output should contain:
15
+ """
16
+ aka - Manage Shell Keyboard Shortcuts
17
+ """
18
+
19
+ Scenario: Get help
20
+ When I run `aka --help`
21
+ Then the exit status should be 0
22
+ And the output should contain:
23
+ """
24
+ aka - Manage Shell Keyboard Shortcuts
25
+ """
26
+
27
+ Scenario: Get version
28
+ When I run `aka --version`
29
+ Then the exit status should be 0
30
+ And the output should contain exactly:
31
+ """
32
+ aka version 0.1.0
33
+
34
+ """
35
+
36
+ Scenario: Help creating new shortcut
37
+ When I run `aka -h add`
38
+ Then the exit status should be 0
39
+ And the output should contain:
40
+ """
41
+ aka-add - Add keyboard shortcuts
42
+ """
43
+
44
+ Scenario: Help listing shortcuts
45
+ When I run `aka -h list`
46
+ Then the exit status should be 0
47
+ And the output should contain:
48
+ """
49
+ aka-list - List keyboard shortcuts
50
+ """
51
+
52
+ Scenario: Help generating shortcuts
53
+ When I run `aka -h generate`
54
+ Then the exit status should be 0
55
+ And the output should contain "aka-generate"
56
+ And the output should contain "Generate commands for loading keyboard shortcuts into"
57
+
58
+ Scenario: Help removing shortcuts
59
+ When I run `aka -h remove`
60
+ Then the exit status should be 0
61
+ And the output should contain:
62
+ """
63
+ aka-remove - Remove keyboard shortcuts
64
+ """
65
+
66
+ Scenario: Help showing shortcuts
67
+ When I run `aka -h show`
68
+ Then the exit status should be 0
69
+ And the output should contain:
70
+ """
71
+ aka-show - Show keyboard shortcuts
72
+ """
73
+
74
+ Scenario: Help editing shortcuts
75
+ When I run `aka -h edit`
76
+ Then the exit status should be 0
77
+ And the output should contain:
78
+ """
79
+ aka-edit - Edit keyboard shortcuts
80
+ """
@@ -0,0 +1,62 @@
1
+ Feature: List keyboard shortcuts
2
+ In order to improve productivity
3
+ I want to have a tool for managing shell keyboard shortcuts
4
+ So I don't have to do it myself
5
+
6
+ Background:
7
+ Given a file named ".aka.yml" should not exist
8
+ And I set the AKA environment variable to the ".aka.yml" file in the working directory
9
+ And I set the environment variables to:
10
+ | variable | value |
11
+ | NO_MAN | 1 |
12
+
13
+ Scenario: List shortcuts
14
+ Given I run `aka add ls "ls -F --color=auto" --description "ls\nls\nls" --function --tag os:linux`
15
+ And I run `aka add ls "ls -FG" --tag os:darwin`
16
+ And I run `aka add .. "cd .."`
17
+ When I run `aka list`
18
+ Then the exit status should be 0
19
+ And the output should contain exactly:
20
+ """
21
+ Created shortcut.
22
+ Created shortcut.
23
+ Created shortcut.
24
+ #default
25
+ ========
26
+ .. cd ..
27
+
28
+ #os:linux
29
+ =========
30
+ ls ls; ls; ls
31
+
32
+ #os:darwin
33
+ ==========
34
+ ls ls -FG
35
+
36
+
37
+ """
38
+
39
+ Scenario: List shortcuts matching tag
40
+ Given I run `aka add ls "ls -F --color=auto" --description "ls\nls\nls" --function --tag os:linux`
41
+ And I run `aka add ls "ls -FG" --tag os:darwin`
42
+ And I run `aka add ... "cd ..." --tag os:windows`
43
+ And I run `aka add .. "cd .."`
44
+ When I run `aka list --tag os:darwin`
45
+ Then the exit status should be 0
46
+ And the output should contain exactly:
47
+ """
48
+ Created shortcut.
49
+ Created shortcut.
50
+ Created shortcut.
51
+ Created shortcut.
52
+ #default
53
+ ========
54
+ .. cd ..
55
+
56
+ #os:darwin
57
+ ==========
58
+ ls ls -FG
59
+
60
+ 2 shortcut(s) excluded (#os:linux, #os:windows).
61
+
62
+ """
@@ -0,0 +1,48 @@
1
+ Feature: Remove keyboard shortcuts
2
+ In order to improve productivity
3
+ I want to have a tool for managing shell keyboard shortcuts
4
+ So I don't have to do it myself
5
+
6
+ Background:
7
+ Given a file named ".aka.yml" should not exist
8
+ And I set the AKA environment variable to the ".aka.yml" file in the working directory
9
+ And I set the environment variables to:
10
+ | variable | value |
11
+ | NO_MAN | 1 |
12
+
13
+ Scenario: Remove shortcut
14
+ Given I run `aka add ls "ls -F --color=auto"`
15
+ When I run `aka remove ls`
16
+ Then the exit status should be 0
17
+ And the output should contain exactly:
18
+ """
19
+ Created shortcut.
20
+ Removed shortcut.
21
+
22
+ """
23
+ And the file ".aka.yml" should contain exactly:
24
+ """
25
+ --- {}
26
+
27
+ """
28
+
29
+ Scenario: Remove missing shortcut
30
+ Given I run `aka add ls "ls -F --color=auto"`
31
+ When I run `aka remove ..`
32
+ Then the exit status should not be 0
33
+ And the output should contain exactly:
34
+ """
35
+ Created shortcut.
36
+ No shortcut "..". Aborting.
37
+
38
+ """
39
+ And the file ".aka.yml" should contain exactly:
40
+ """
41
+ ---
42
+ 1: !ruby/object:OpenStruct
43
+ table:
44
+ :shortcut: ls
45
+ :command: ls -F --color=auto
46
+ modifiable: true
47
+
48
+ """
@@ -0,0 +1,38 @@
1
+ Feature: Show keyboard shortcuts
2
+ In order to improve productivity
3
+ I want to have a tool for managing shell keyboard shortcuts
4
+ So I don't have to do it myself
5
+
6
+ Background:
7
+ Given a file named ".aka.yml" should not exist
8
+ And I set the AKA environment variable to the ".aka.yml" file in the working directory
9
+ And I set the environment variables to:
10
+ | variable | value |
11
+ | NO_MAN | 1 |
12
+
13
+ Scenario: Show shortcut
14
+ Given I run `aka add ls "ls -F --color=auto" --function --description "1\n2" --tag osx`
15
+ When I run `aka show ls`
16
+ Then the exit status should be 0
17
+ And the output should contain exactly:
18
+ """
19
+ Created shortcut.
20
+ Shortcut: ls
21
+ Description:
22
+ 1
23
+ 2
24
+ Function: y
25
+ Tags: #osx
26
+ Command:
27
+ ls -F --color=auto
28
+
29
+ """
30
+
31
+ Scenario: Show missing shortcut
32
+ When I run `aka show ls`
33
+ Then the exit status should not be 0
34
+ And the output should contain exactly:
35
+ """
36
+ Shortcut not found.
37
+
38
+ """
@@ -0,0 +1,3 @@
1
+ Given(/^I set the AKA environment variable to the "(.*?)" file in the working directory$/) do |file_name|
2
+ set_env('AKA', File.expand_path(File.join(File.dirname(__FILE__), '../../tmp/aruba', file_name)))
3
+ end
@@ -0,0 +1,80 @@
1
+ require 'aruba/cucumber'
2
+ require 'methadone/cucumber'
3
+ require 'aruba/in_process'
4
+
5
+ ENV['PATH'] = "#{File.expand_path(File.dirname(__FILE__) + '/../../bin')}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
6
+ LIB_DIR = File.join(File.expand_path(File.dirname(__FILE__)),'..','..','lib')
7
+
8
+ require 'aka.rb'
9
+
10
+ class Main
11
+ def initialize(argv, stdin = STDIN, stdout = STDOUT, stderr = STDERR, kernel = Kernel)
12
+ @argv, @stdin, @stdout, @stderr, @kernel = argv, stdin, stdout, stderr, kernel
13
+ end
14
+
15
+ def execute!
16
+ original_file = $0
17
+ original_argv = ::ARGV.dup
18
+ original_stderr = $original_stderr = $stderr
19
+ original_stdin = $original_stdin = $stdin
20
+ original_stdout = $stdout
21
+
22
+ Aruba::Api.class_eval do
23
+ def announcer
24
+ Aruba::Api::Announcer.new(self,
25
+ :stdout => $original_stdin,
26
+ :stderr => $original_stderr,
27
+ :dir => @announce_dir,
28
+ :cmd => @announce_cmd,
29
+ :env => @announce_env)
30
+ end
31
+ end
32
+
33
+ begin
34
+ $0 = File.expand_path(File.dirname(__FILE__) + '/../../bin/aka')
35
+
36
+ ::ARGV.clear
37
+ ::ARGV.push(*@argv)
38
+
39
+ $stderr = @stderr
40
+ $stdin = @stdin
41
+ $stdout = @stdout
42
+
43
+ if defined?(Aka::App)
44
+ Aka::App.send(:reset!)
45
+ load 'aka/app.rb'
46
+ end
47
+
48
+ Aka::App.change_logger(Methadone::CLILogger.new(@stdout, @stderr))
49
+
50
+ Aka::App.go!
51
+ rescue SystemExit => e
52
+ @kernel.exit(e.status)
53
+ ensure
54
+ $0 = original_file
55
+
56
+ ::ARGV.clear
57
+ ::ARGV.push(*original_argv)
58
+
59
+ $stderr = original_stderr
60
+ $stdin = original_stdin
61
+ $stdout = original_stdout
62
+
63
+ Aka::App.change_logger(Methadone::CLILogger.new($stdout, $stderr))
64
+ end
65
+ end
66
+ end
67
+
68
+ Aruba::InProcess.main_class = Main
69
+ Aruba.process = Aruba::InProcess
70
+
71
+ Before do
72
+ # Using "announce" causes massive warnings on 1.9.2
73
+ @puts = true
74
+ @original_rubylib = ENV['RUBYLIB']
75
+ ENV['RUBYLIB'] = LIB_DIR + File::PATH_SEPARATOR + ENV['RUBYLIB'].to_s
76
+ end
77
+
78
+ After do
79
+ ENV['RUBYLIB'] = @original_rubylib
80
+ end
data/lib/aka/app.rb ADDED
@@ -0,0 +1,66 @@
1
+ require 'optparse'
2
+ require 'methadone'
3
+
4
+ module Aka
5
+ class App
6
+ include Methadone::Main
7
+ include Methadone::CLILogging
8
+
9
+ def self.which(executable)
10
+ if File.file?(executable) && File.executable?(executable)
11
+ executable
12
+ elsif ENV['PATH']
13
+ path = ENV['PATH'].split(File::PATH_SEPARATOR).find do |p|
14
+ File.executable?(File.join(p, executable))
15
+ end
16
+ path && File.expand_path(executable, path)
17
+ end
18
+ end
19
+
20
+ main do |command, shortcut, script|
21
+ if options[:version]
22
+ puts "aka version #{Aka::VERSION}"
23
+ exit
24
+ end
25
+
26
+ options['shortcut'] = options[:shortcut] = shortcut
27
+ options['command'] = options[:command] = script
28
+
29
+ store = Aka::Store.new
30
+
31
+ store.help(command, options) and exit if options[:help]
32
+
33
+ case command
34
+ when 'add'
35
+ store.add(options)
36
+ when 'list'
37
+ store.list(options)
38
+ when 'remove'
39
+ store.remove(options)
40
+ when 'generate'
41
+ store.generate(options)
42
+ when 'edit'
43
+ store.edit(options)
44
+ when 'show'
45
+ store.show(options)
46
+ else
47
+ store.help(command, options)
48
+ end
49
+ end
50
+
51
+ arg :command, :optional
52
+ arg :shortcut, :optional
53
+ arg :script, :optional
54
+
55
+ on("-t TAG", '--tag', Array)
56
+ on("-f", '--force')
57
+ on("-F", "--function")
58
+ on("-d DESCRIPTION", "--description")
59
+ on("-o FILE", "--output")
60
+ on("-i FILE", "--input")
61
+ on("-h", "--help")
62
+ on("-v", "--version")
63
+
64
+ use_log_level_option
65
+ end
66
+ end
@@ -0,0 +1,34 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "AKA\-ADD" "1" "February 2014" "" ""
5
+ .
6
+ .SH "NAME"
7
+ \fBaka\-add\fR \- Add keyboard shortcuts
8
+ .
9
+ .SH "SYNOPSIS"
10
+ \fBaka add\fR \fIshortcut\fR \fIcommand\fR [\fB\-d\fR \fIdescription\fR] [\fB\-t\fR \fItag1\fR[,\fItag2\fR\.\.\.]] [\fB\-F\fR] [\fB\-f\fR]
11
+ .
12
+ .SH "DESCRIPTION"
13
+ This command adds a keyboard shortcut to \fBaka(7)\fR\.
14
+ .
15
+ .SH "OPTIONS"
16
+ .
17
+ .TP
18
+ \fB\-d <description>\fR
19
+ Provide a description for the shortcut\.
20
+ .
21
+ .TP
22
+ \fB\-t\fR \fItag1\fR[,\fItag2\fR\.\.\.]
23
+ A comma\-separated list of tags for the shortcut\.
24
+ .
25
+ .TP
26
+ \fB\-F\fR
27
+ Create the shortcut as a shell function\.
28
+ .
29
+ .TP
30
+ \fB\-f\fR
31
+ Ovewrite an existing shortcut if a shortcut exists with the same \fIshortcut\fR\.
32
+ .
33
+ .SH "SEE ALSO"
34
+ \fBaka(7)\fR, \fBaka\-show(1)\fR
@@ -0,0 +1,31 @@
1
+ AKA-ADD(1) AKA-ADD(1)
2
+
3
+
4
+
5
+ NAME
6
+ aka-add - Add keyboard shortcuts
7
+
8
+ SYNOPSIS
9
+ aka add shortcut command [-d description] [-t tag1[,tag2...]] [-F] [-f]
10
+
11
+ DESCRIPTION
12
+ This command adds a keyboard shortcut to aka(7).
13
+
14
+ OPTIONS
15
+ -d <description>
16
+ Provide a description for the shortcut.
17
+
18
+ -t tag1[,tag2...]
19
+ A comma-separated list of tags for the shortcut.
20
+
21
+ -F Create the shortcut as a shell function.
22
+
23
+ -f Ovewrite an existing shortcut if a shortcut exists with the same
24
+ shortcut.
25
+
26
+ SEE ALSO
27
+ aka(7), aka-show(1)
28
+
29
+
30
+
31
+ February 2014 AKA-ADD(1)
@@ -0,0 +1,96 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "AKA\-EDIT" "1" "February 2014" "" ""
5
+ .
6
+ .SH "NAME"
7
+ \fBaka\-edit\fR \- Edit keyboard shortcuts
8
+ .
9
+ .SH "SYNOPSIS"
10
+ \fBaka edit\fR \fIshortcut\fR [\fB\-i\fR input]
11
+ .
12
+ .SH "DESCRIPTION"
13
+ This command edits a keyboard shortcut in \fBaka(7)\fR\.
14
+ .
15
+ .P
16
+ The command can be performed interactively or via an input file\.
17
+ .
18
+ .SH "OPTIONS"
19
+ .
20
+ .TP
21
+ \fB\-i <input>\fR
22
+ Update the shortcut with an input file\. See the "FORMAT" section for more details\.
23
+ .
24
+ .SH "FORMAT"
25
+ The format should include the following sections (in order):
26
+ .
27
+ .IP "\(bu" 4
28
+ \fBShortcut: <shortcut>\fR
29
+ .
30
+ .br
31
+ Where \fIshortcut\fR is the string to change the \fIshortcut\fR cut\.
32
+ .
33
+ .IP "\(bu" 4
34
+ \fBDescription: <description>\fR
35
+ .
36
+ .br
37
+ Where \fIdescription\fR is one or more lines of text\.
38
+ .
39
+ .IP "\(bu" 4
40
+ \fBFunction (y/n): <y|n>\fR
41
+ .
42
+ .br
43
+ Where \fIy|n\fR is either \fBy\fR or \fBn\fR\.
44
+ .
45
+ .IP "\(bu" 4
46
+ \fBTags: <tags>\fR
47
+ .
48
+ .br
49
+ Where \fItags\fR is a comma\-separated list of tags for the shortcut\.
50
+ .
51
+ .IP "\(bu" 4
52
+ \fBCommand: <command>\fR
53
+ .
54
+ .br
55
+ Where \fIcommand\fR is one or more lines of text\.
56
+ .
57
+ .IP "" 0
58
+ .
59
+ .SH "INTERACTIVE MODE"
60
+ When the command enters the interactive mode, it shows the \fIshortcut\fR in the expected \fBFORMAT\fR in an interactive editor\.
61
+ .
62
+ .SH "EXAMPLES"
63
+ Edit a shortcut where \fBinput\.txt\fR is:
64
+ .
65
+ .IP "" 4
66
+ .
67
+ .nf
68
+
69
+ Shortcut: lsf
70
+ Description:
71
+ 1
72
+ 2
73
+ 3
74
+ Function (y/n): y
75
+ Tags: zsh, bash
76
+ Command:
77
+ ls \-F
78
+
79
+ $ aka edit lsf \-i input\.txt
80
+ Saved shortcut\.
81
+ .
82
+ .fi
83
+ .
84
+ .IP "" 0
85
+ .
86
+ .SH "ENVIRONMENT"
87
+ .
88
+ .TP
89
+ \fBEDITOR\fR:
90
+ .
91
+ .br
92
+ The editor \fBaka\fR will use in interactive mode\. Default: vim
93
+
94
+ .
95
+ .SH "SEE ALSO"
96
+ \fBaka(7)\fR, \fBaka\-show(1)\fR
@@ -0,0 +1,75 @@
1
+ AKA-EDIT(1) AKA-EDIT(1)
2
+
3
+
4
+
5
+ NAME
6
+ aka-edit - Edit keyboard shortcuts
7
+
8
+ SYNOPSIS
9
+ aka edit shortcut [-i input]
10
+
11
+ DESCRIPTION
12
+ This command edits a keyboard shortcut in aka(7).
13
+
14
+ The command can be performed interactively or via an input file.
15
+
16
+ OPTIONS
17
+ -i <input>
18
+ Update the shortcut with an input file. See the "FORMAT" section
19
+ for more details.
20
+
21
+ FORMAT
22
+ The format should include the following sections (in order):
23
+
24
+ o Shortcut: <shortcut>
25
+ Where shortcut is the string to change the shortcut cut.
26
+
27
+ o Description: <description>
28
+ Where description is one or more lines of text.
29
+
30
+ o Function (y/n): <y|n>
31
+ Where y|n is either y or n.
32
+
33
+ o Tags: <tags>
34
+ Where tags is a comma-separated list of tags for the shortcut.
35
+
36
+ o Command: <command>
37
+ Where command is one or more lines of text.
38
+
39
+
40
+
41
+ INTERACTIVE MODE
42
+ When the command enters the interactive mode, it shows the shortcut in
43
+ the expected FORMAT in an interactive editor.
44
+
45
+ EXAMPLES
46
+ Edit a shortcut where input.txt is:
47
+
48
+
49
+
50
+ Shortcut: lsf
51
+ Description:
52
+ 1
53
+ 2
54
+ 3
55
+ Function (y/n): y
56
+ Tags: zsh, bash
57
+ Command:
58
+ ls -F
59
+
60
+ $ aka edit lsf -i input.txt
61
+ Saved shortcut.
62
+
63
+
64
+
65
+ ENVIRONMENT
66
+ EDITOR:
67
+ The editor aka will use in interactive mode. Default: vim
68
+
69
+
70
+ SEE ALSO
71
+ aka(7), aka-show(1)
72
+
73
+
74
+
75
+ February 2014 AKA-EDIT(1)
@@ -0,0 +1,81 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "AKA\-GENERATE" "1" "February 2014" "" ""
5
+ .
6
+ .SH "NAME"
7
+ \fBaka\-generate\fR \- Generate commands for loading keyboard shortcuts into your shell
8
+ .
9
+ .SH "SYNOPSIS"
10
+ \fBaka generate\fR [\fB\-t\fR \fItag1\fR[,\fItag2\fR\.\.\.]] [\fB\-o\fR \fIoutput\fR]
11
+ .
12
+ .SH "DESCRIPTION"
13
+ This command generates commands for loading keyboard shortcuts in \fBaka(7)\fR into your shell\.
14
+ .
15
+ .P
16
+ This command can be performed with or without tag filtering\.
17
+ .
18
+ .P
19
+ By default, the commands are generated to \fBSTDOUT\fR\.
20
+ .
21
+ .SH "OPTIONS"
22
+ .
23
+ .TP
24
+ \fB\-t\fR \fItag1\fR[,\fItag2\fR\.\.\.]
25
+ 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\.
26
+ .
27
+ .TP
28
+ \fB\-o <output>\fR
29
+ The location to generate the commands to\.
30
+ .
31
+ .SH "EXAMPLES"
32
+ Generate for all shortcuts:
33
+ .
34
+ .IP "" 4
35
+ .
36
+ .nf
37
+
38
+ $ aka generate
39
+ alias \.\.="cd \.\."
40
+ alias ls="ls \-FG"
41
+ function ls {
42
+ ls \-F \-\-color=auto
43
+ }
44
+ .
45
+ .fi
46
+ .
47
+ .IP "" 0
48
+ .
49
+ .P
50
+ Generate for shortcuts matching \fB\-\-tag os:darwin\fR:
51
+ .
52
+ .IP "" 4
53
+ .
54
+ .nf
55
+
56
+ $ aka generate \-t os:darwin
57
+ alias \.\.="cd \.\."
58
+ alias ls="ls \-FG"
59
+
60
+ 2 shortcut(s) excluded (#os:linux, #os:windows)\.
61
+ .
62
+ .fi
63
+ .
64
+ .IP "" 0
65
+ .
66
+ .P
67
+ Generate to file:
68
+ .
69
+ .IP "" 4
70
+ .
71
+ .nf
72
+
73
+ $ aka generate \-o ~/\.aka\.zsh
74
+ Generated ~/\.aka\.zsh\.
75
+ .
76
+ .fi
77
+ .
78
+ .IP "" 0
79
+ .
80
+ .SH "SEE ALSO"
81
+ \fBaka(7)\fR, \fBaka\-show(1)\fR