Skip to main content

PyPI version PyPI pyversions PyPI status

Bring your ZSH history to Fish shell

This is a simple tool to ease the migration from ZSH to Fish shell, without losing your hard-earned history commands.

As I was migrating myself, I've found out there's no tool to do this automatically, so I've made one for my own use. For that, I had to search for the specifications of both history files, and ended up involved in multiple threads with the right devs to try to understand and make it work. In the process, I've stumbled upon several people interested in a such a tool.

Well, it has worked! So I've wrapped it in a python package to make it easy to use, and now I'm sharing with anyone who may need it! It's released on PyPI.

Get it

Just do in your zsh shell:

❯ pip install zsh-history-to-fish

How to use

❯ zsh-history-to-fish --help
Usage: zsh-history-to-fish [OPTIONS] [INPUT_FILE]

  Bring your ZSH history to Fish shell.

Options:
  --version               Show the version and exit.
  -o, --output_file PATH  Optional output, will append to fish history by default
  -d, --dry-run           Do not write anything to filesystem
  -n, --no-convert        Do not naively convert commands
  --help                  Show this message and exit.

A successful run looks like:

❯ zsh-history-to-fish -dn
ZSH history to Fish
===================
input : /Users/rogerio/.zsh_history (naive-convert=False)
output: dry run mode
.......
Processed 6515 commands.
No file has been written.

Changelog highlights:

  • 0.3.0: fix for empty history lines, and general command output improvements
  • 0.2.0: use actual zsh process to import history, since it does not use utf-8
  • 0.1.0: initial version

License

This software is licensed under the MIT License. See the LICENSE file in the top distribution directory for the full license text.

Did you like it?

Thank you for your interest!

I've put much ❤️ and effort into this.
If you appreciate my work you can sponsor me, buy me a coffee! The button is on the top right of the page (the big orange one, it's hard to miss 😊)

Release files for zsh-history-to-fish 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zsh-history-to-fish 0.3.0
File Size Uploaded
zsh-history-to-fish-0.3.0.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zsh-history-to-fish 0.3.0
File Interpreter ABI Platform
zsh_history_to_fish-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 kB

Release files / zsh-history-to-fish-0.3.0.tar.gz

Download URL zsh-history-to-fish-0.3.0.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7b1a4fb9f7d9b6dc97351adea653c2e447bf8df580c8e9e68d320c5ce36dae7c
BLAKE2b-256 checksum
How to use checksums
ca20e648bafb21accd9279fcbb8bcf8368f915fce87e96a36c491ed99f7aaa45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

Release files / zsh_history_to_fish-0.3.0-py3-none-any.whl

Download URL zsh_history_to_fish-0.3.0-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c7a25bd5e3e0e69b9db7b5ba15e56d1f34c446f8a952dc547812de2f1f294217
BLAKE2b-256 checksum
How to use checksums
584c522032197f8e48c2c8efcc042420f9289c4c3ad6cad5f37ac34810eaf45f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page