diff options
| author | Paul Buetow <paul@buetow.org> | 2025-11-01 23:29:36 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-11-01 23:29:36 +0200 |
| commit | dc2d267244d6dd9d991207fe193e987b6477c415 (patch) | |
| tree | 99e13fa68e0add5afd6d0901a90be440d9fc6561 | |
| parent | bb9f2c6f49103fdc3a771c09ac96811e0745c1ec (diff) | |
Amp-Thread-ID: https://ampcode.com/threads/T-9aec59d6-cd27-4607-ac11-baac5f2ca758
Co-authored-by: Amp <amp@ampcode.com>
| -rwxr-xr-x | geheim.rb | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -10,7 +10,7 @@ require 'openssl' require 'json' require 'readline' -VERSION = 'v0.3.0' +VERSION = 'v0.3.1' # Configuration class Config @@ -641,13 +641,12 @@ class CLI input = Readline.readline('% ', true) break if input.nil? # Handle Ctrl+D + argv = input.strip.split + # Don't add empty lines or duplicates to history - Readline::HISTORY.pop if input.strip.empty? || + Readline::HISTORY.pop if argv.empty? || (Readline::HISTORY.length > 1 && Readline::HISTORY[-1] == Readline::HISTORY[-2]) - - argv = input.strip.split - next if argv.empty? end geheim = Geheim.new |
