Git Product home page Git Product logo

zsh-history-to-fish's Introduction

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 😊)

zsh-history-to-fish's People

Contributors

rsalmei avatar sporqist avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.