aka2 0.1.7 → 0.1.8
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/changelog.md +4 -0
- data/lib/aka.rb +10 -11
- data/lib/aka/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: 90b9680db7800abab6aae261dba6f793f6afe742
|
4
|
+
data.tar.gz: 5fb1c599c59e739026ad9a8cf03dc980988284a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e1c26c386de17ef6d412f84bc896076cab09da5a4c00ff5c12915ca992196baba71fdb6b7d5663c283646280663094a6a11d68ca8f93488014748fca2300aee
|
7
|
+
data.tar.gz: 649c130efb72f720cca57869ef70d67bd7d1b6c240913cff74117661866bdf35745cd60acad5c67e58f90c58f55a8f15004ef343d1261c5df8a54a51c71c72cc
|
data/Gemfile.lock
CHANGED
data/changelog.md
CHANGED
data/lib/aka.rb
CHANGED
@@ -191,9 +191,9 @@ module Aka
|
|
191
191
|
truth, _alias = search_alias_return_alias_tokens(args)
|
192
192
|
if truth == true
|
193
193
|
if options.name
|
194
|
-
|
195
|
-
|
196
|
-
|
194
|
+
remove(_alias) #remove that alias
|
195
|
+
edit_alias_name(values[1], _alias) #edit that alias
|
196
|
+
reload_dot_file() if !options.noreload
|
197
197
|
else
|
198
198
|
remove(_alias) #remove that alias
|
199
199
|
edit_alias_command(values[1], _alias) #edit that alias
|
@@ -239,7 +239,6 @@ module Aka
|
|
239
239
|
showlast(options.number,args.to_i) #user input
|
240
240
|
else
|
241
241
|
value = readYML("#{Dir.home}/.aka/.config")["list"]
|
242
|
-
puts value.class
|
243
242
|
if value.class == Fixnum
|
244
243
|
showlast(options.number,value.to_i)
|
245
244
|
else
|
@@ -342,7 +341,7 @@ module Aka
|
|
342
341
|
writeYML("#{Dir.home}/.aka/.config", data)
|
343
342
|
puts "#{value} -> #{path}"
|
344
343
|
else
|
345
|
-
puts "
|
344
|
+
puts "Error: ".red + "--#{value} does not exist in #{Dir.home}/.aka/.config "
|
346
345
|
end
|
347
346
|
end
|
348
347
|
|
@@ -460,7 +459,7 @@ module Aka
|
|
460
459
|
|
461
460
|
return true
|
462
461
|
else
|
463
|
-
puts "The alias is already present."
|
462
|
+
puts "The alias is already present. Use 'aka -h' to see all the useful commands."
|
464
463
|
return false
|
465
464
|
end
|
466
465
|
end
|
@@ -599,7 +598,7 @@ module Aka
|
|
599
598
|
if answer == argument
|
600
599
|
# puts line.red + " - aka add #{argument}"
|
601
600
|
# puts line.red
|
602
|
-
puts "
|
601
|
+
puts "Exist: ".green + " aka g #{argument}=#{line.split('=')[1]}"
|
603
602
|
return true
|
604
603
|
else
|
605
604
|
return false
|
@@ -607,13 +606,13 @@ module Aka
|
|
607
606
|
end
|
608
607
|
|
609
608
|
def edit_alias_command newcommand, this_alias
|
610
|
-
puts "
|
609
|
+
puts "Edited: ".yellow + "aka g #{this_alias}='#{newcommand}'"
|
611
610
|
return append("alias " + this_alias + "='" + newcommand + "'", readYML("#{Dir.home}/.aka/.config")["dotfile"] )
|
612
611
|
end
|
613
612
|
|
614
613
|
# edit alias
|
615
614
|
def edit_alias_name newalias, thiscommand
|
616
|
-
puts "
|
615
|
+
puts "Edited: ". yellow + "aka g #{newalias}='#{thiscommand}'"
|
617
616
|
return append("alias " + newalias + "='" + thiscommand + "'", readYML("#{Dir.home}/.aka/.config")["dotfile"] )
|
618
617
|
end
|
619
618
|
|
@@ -814,12 +813,12 @@ module Aka
|
|
814
813
|
def checkConfigFile str
|
815
814
|
path = "#{Dir.home}/.bash_profile"
|
816
815
|
if str == ""
|
817
|
-
puts "Error: Type `aka init --dotfile #{path}` to set the path to your dotfile. \nReplace .bash_profile with .bashrc or .zshrc if you are not using bash."
|
816
|
+
puts "Error: ".red + "Type `aka init --dotfile #{path}` to set the path to your dotfile. \nReplace .bash_profile with .bashrc or .zshrc if you are not using bash."
|
818
817
|
exit()
|
819
818
|
end
|
820
819
|
|
821
820
|
if !File.exists?(str)
|
822
|
-
puts "Error: Type `aka init --dotfile #{path}` to set the path of your dotfile. \nReplace .bash_profile with .bashrc or .zshrc if you are not using bash."
|
821
|
+
puts "Error: ".red + "Type `aka init --dotfile #{path}` to set the path of your dotfile. \nReplace .bash_profile with .bashrc or .zshrc if you are not using bash."
|
823
822
|
exit()
|
824
823
|
end
|
825
824
|
|
data/lib/aka/version.rb
CHANGED