From 794c99a71c5eab3a82841837261a6fa8e14ebb58 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Wed, 27 Nov 2024 00:07:42 -0800 Subject: [PATCH] Update README and update tests that need to run sequencially --- README.md | 45 +++++++++++++++++++++++++++++++++++- Tests/FileHelpersTests.swift | 1 + Tests/ParserTests.swift | 2 +- 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d7b33d3..139c131 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,46 @@ # Fishee -Fishee CLI Tool for Fish Shell \ No newline at end of file +Fishee CLI Tool for Fish Shell + +## About Fishee + +So I have been a user of Fish Shell for quite a while now and really enjoy using it. + +So I decided to write this CLI tool for Fish Shell that helps me manage my fish history. + +## Features + +- Print my fish history +- Merge two history files into one + - Useful for when you want to add fish history from one computer to another +- remove duplicates from history file when merging + +## Usage + +In terminal run: + +``` +fishee --help +``` + +``` +USAGE: fishee [--history-file ] [--merge-file ] [--output-file ] [--dry-run] [--remove-duplicates] [--backup] [--no-backup] + +OPTIONS: + -f, --history-file + Location of your fish history file. Will default to + ~/.local/share/fish/fish_history + -m, --merge-file + File path to file to merge with history file. + -w, --output-file + File to write to. Default: same as current history + file. + -d, --dry-run Dry run. Will only print to the console without + actually modifying the history file. + -r, --remove-duplicates Remove duplicates from combined history. Default: + false + -b, --backup/--no-backup + Backup fish history file given before writing. + (default: --backup) + -h, --help +``` diff --git a/Tests/FileHelpersTests.swift b/Tests/FileHelpersTests.swift index 223a5e7..8abd3df 100644 --- a/Tests/FileHelpersTests.swift +++ b/Tests/FileHelpersTests.swift @@ -19,6 +19,7 @@ import Testing @testable import Fishee +@Suite(.serialized) final class FileHelpersTests { let filePath = FileManager.default.homeDirectoryForCurrentUser.appendingPathComponent("myfile.txt") diff --git a/Tests/ParserTests.swift b/Tests/ParserTests.swift index 533b811..a6d54e9 100644 --- a/Tests/ParserTests.swift +++ b/Tests/ParserTests.swift @@ -18,7 +18,7 @@ import Foundation import Testing @testable import Fishee -@Suite +@Suite(.serialized) final class ParserTests { let fishHistoryFile = Bundle.module.path(forResource: "fish_history_test", ofType: "txt") let historyItem = FishHistoryEntry(cmd: "cd Projects/Fishee/", when: 1727545693, paths: ["Projects/Fishee/"])