Module: Usage
- Defined in:
- lib/usage.rb
Overview
Module with Mkalias usage options
Class Method Summary collapse
- .attention ⇒ Object
- .header ⇒ Object
- .option_list ⇒ Object
- .option_new ⇒ Object
- .option_remove ⇒ Object
- .option_show ⇒ Object
- .option_signals ⇒ Object
Class Method Details
.attention ⇒ Object
50 51 52 53 54 55 |
# File 'lib/usage.rb', line 50 def attention %( Attention: To make alias with args use #. Example: $ mkalias new [alias] "echo #1 #2 #3" - Then you can use: $ [alias] arg1 arg2 arg3 ) end |
.header ⇒ Object
5 6 7 8 9 10 |
# File 'lib/usage.rb', line 5 def header %(Usage: mkalias [option] options: ) end |
.option_list ⇒ Object
18 19 20 21 22 |
# File 'lib/usage.rb', line 18 def option_list %( list \t\t $ mkalias list \t\t - List all alias ) end |
.option_new ⇒ Object
12 13 14 15 16 |
# File 'lib/usage.rb', line 12 def option_new %( new \t\t $ mkalias new [alias] [command 1] [command 2] ... [command n] \t\t - Create a new alias to run the commands ) end |
.option_remove ⇒ Object
33 34 35 36 37 |
# File 'lib/usage.rb', line 33 def option_remove %( remove \t $ mkalias remove [alias 1] [alias 2] ... [alias n] \t\t - Remove the specified alias ) end |
.option_show ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/usage.rb', line 24 def option_show %( show \t\t $ mkalias show \t\t - Show commands of all alias \t\t $ mkalias show [alias 1] [alias 2] ... [alias n] \t\t - Show commands of the specified alias ) end |
.option_signals ⇒ Object
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/usage.rb', line 39 def option_signals %( add_signal \t $ mkalias add_signal \t\t - Add signal to run 'source ~/.bashrc' when \t\t - add or remove an alias remove_signal $ mkalias remove_signal \t\t - Remove signal to run 'source ~/.bashrc' when \t\t - add or remove an alias ) end |