https://github.com/scnewma/fish-hist-import
A tool to import ZSH history into FISH, converting commands and expanding aliases for seamless transition between shells.
https://github.com/scnewma/fish-hist-import
fish history rust shell zsh
Last synced: 2 months ago
JSON representation
A tool to import ZSH history into FISH, converting commands and expanding aliases for seamless transition between shells.
- Host: GitHub
- URL: https://github.com/scnewma/fish-hist-import
- Owner: scnewma
- License: mit
- Created: 2025-03-04T18:29:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-04T18:37:14.000Z (over 1 year ago)
- Last Synced: 2025-03-04T19:33:12.339Z (over 1 year ago)
- Topics: fish, history, rust, shell, zsh
- Language: Rust
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fish-hist-import
`fish-hist-import` is a tool that helps you import your ZSH history into FISH. It reads your ZSH history file, converts the commands to FISH syntax, expands aliases, and converts ZSH-specific syntax to FISH syntax.
## Prerequisites
Before you can use `fish-hist-import`, you need to have the Rust toolchain installed. You can install it via [rustup](https://rustup.rs/).
## Installation
To install `fish-hist-import`, clone the repository and build the project using Cargo:
```sh
git clone git@github.com:scnewma/fish-hist-import.git
cd fish-hist-import
cargo install --path .
```
Replace `` with the URL of your repository.
## Usage
Once installed, you can run the `fish-hist-import` binary to import your ZSH history into FISH:
```sh
fish-hist-import
```
The tool will read the `HISTFILE` from ZSH, convert the commands, and append them to your FISH history file located at `~/.local/share/fish/fish_history`.
## Configuration
`fish-hist-import` reads the `HISTFILE` environment variable from ZSH to locate your ZSH history file. Make sure this variable is set correctly in your ZSH configuration.
## Limitations
- The conversion from ZSH to FISH is basic and uses string replacement. This may lead to incorrect replacements, such as replacing `&&` in the middle of a string.
- The tool does not handle all edge cases and may not work perfectly for all ZSH commands.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
## Credits
This project was inspired by [rsalmei/zsh-history-to-fish](https://github.com/rsalmei/zsh-history-to-fish).