redundancy 0.0.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 (4) hide show
  1. checksums.yaml +7 -0
  2. data/bin/redundancy +3 -0
  3. data/lib/redundancy.rb +18 -0
  4. metadata +51 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6b9a40e36a7f09dee47647306e6700bd2dbad068cdd2dfb92e45fc031f1330b4
4
+ data.tar.gz: 2b742fddf8346787022838219d36321810065a6a89110e963701b24036ac30aa
5
+ SHA512:
6
+ metadata.gz: 24987ef54eab9508b1e0c95cd6e739288e7639c361787c06cbdda7a23c1b40d92ba84a91007c03ae0df7953ff04910abf3f1b7bd344051c6336ca7356a1d53e7
7
+ data.tar.gz: 4ced2d69ca2b21f47b34f61d8dd2930c1e87d616bad497ec32646099a713e1c9dbec6c3ff8f5d04088cb4837ec2b1ee58b10f435cc215103fe83c9b38b4e21b1
data/bin/redundancy ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'redundancy'
data/lib/redundancy.rb ADDED
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env ruby
2
+ $stdin.flush
3
+ $stdout.flush
4
+ $stdout.sync = true
5
+
6
+ arr = ["/.bash_history", "/.irb_history", "/.zsh_history"]
7
+
8
+ for i in arr do
9
+ l = Dir.home + i
10
+ e = File.readlines(l)
11
+ e.uniq!
12
+ f = File.open(l, "w")
13
+
14
+ e.each do |line|
15
+ f.puts(line)
16
+ end
17
+ f.close
18
+ end
metadata ADDED
@@ -0,0 +1,51 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: redundancy
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Byron Stuike
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-02-05 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Redundancy is a ruby program that loads the .zsh_history, .bash_history,
14
+ .irb_history files, and applies the built in Ruby uniq! function to trim any duplicate
15
+ commands present. It then writes the filtered output back to the appropriate file.
16
+ The source code works better as an Apple Shortcut, as there is a significant delay
17
+ running redundancy when Terminal is open (several closings and reopenings).
18
+ email: bstuike@duck.com
19
+ executables:
20
+ - redundancy
21
+ extensions: []
22
+ extra_rdoc_files: []
23
+ files:
24
+ - bin/redundancy
25
+ - lib/redundancy.rb
26
+ homepage: https://github.com/nausicaan/redundancy
27
+ licenses:
28
+ - Unlicense
29
+ metadata:
30
+ homepage_uri: https://github.com/nausicaan/redundancy
31
+ source_code_uri: https://github.com/nausicaan/redundancy
32
+ post_install_message:
33
+ rdoc_options: []
34
+ require_paths:
35
+ - lib
36
+ required_ruby_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 3.0.5
41
+ required_rubygems_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: 3.4.0
46
+ requirements: []
47
+ rubygems_version: 3.4.6
48
+ signing_key:
49
+ specification_version: 4
50
+ summary: Delete duplicate commands from zsh, bash, and irb history.
51
+ test_files: []