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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 23306527f5f14dff1376ec38781c574c1bc087f6
4
- data.tar.gz: 9e17ad0b8def61e51a0f22aea50c8588453011cd
3
+ metadata.gz: 90b9680db7800abab6aae261dba6f793f6afe742
4
+ data.tar.gz: 5fb1c599c59e739026ad9a8cf03dc980988284a1
5
5
  SHA512:
6
- metadata.gz: c5ecc7170e2431375731d8a9fe0b6a5bfd616da4e00cbff7e9943c8041d940c2b6284ec9ee98d2ff3cbaaafac16e92d1f5a6c39754243e5ac364b756f1772e76
7
- data.tar.gz: 1e748466b93b74facfa5236bcaa297988e6d526cde128b860a82157fa1dfe6800be507a06bcf187fae4cc3f37ec9977ad2bb8d5493de058560f814496de82e42
6
+ metadata.gz: 6e1c26c386de17ef6d412f84bc896076cab09da5a4c00ff5c12915ca992196baba71fdb6b7d5663c283646280663094a6a11d68ca8f93488014748fca2300aee
7
+ data.tar.gz: 649c130efb72f720cca57869ef70d67bd7d1b6c240913cff74117661866bdf35745cd60acad5c67e58f90c58f55a8f15004ef343d1261c5df8a54a51c71c72cc
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- aka2 (0.1.7)
4
+ aka2 (0.1.8)
5
5
  colorize (~> 0)
6
6
  net-scp (~> 1.2, >= 1.2.1)
7
7
  safe_yaml (~> 1.0, >= 1.0.4)
@@ -1,3 +1,7 @@
1
+ ## v0.1.8
2
+
3
+ * Merge from ytbryan - Edit 'Error','Exist' output
4
+
1
5
  ## v0.1.7
2
6
 
3
7
  * Add numbering option for list
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
- remove(_alias) #remove that alias
195
- edit_alias_name(values[1], _alias) #edit that alias
196
- reload_dot_file() if !options.noreload
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 "error: --#{value} does not exist in #{Dir.home}/.aka/.config "
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 "found: aka g #{argument}=#{line.split('=')[1]}".red
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 "new: aka g #{this_alias}='#{newcommand}'"
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 "new: aka g #{newalias}='#{thiscommand}'"
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.".red
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.".red
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
 
@@ -1,3 +1,3 @@
1
1
  module Aka
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aka2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Lim