Quantcast
Channel: Planet Python
Viewing all articles
Browse latest Browse all 22462

Justin Mayer: Tacklebox for the Fish Shell

$
0
0

So you have installed the Fish shell. Now what?

Rather than manually port all of your Bash/Zsh configuration, you might first consider whether someone has already implemented your desired function in Fish. My Tacklebox and Tackle projects are designed to make it easier for you to utilize existing Fish shell plugins, modules, and shell prompt themes — as well as to have an easy way to add your own. You can read more about it in the Tacklebox announcement post.

Assuming you have followed the installation and usage docs and have installed Tacklebox and Tackle, you can now take advantage of some handy tools, as we’ll see below.

Keeping up-to-date

I often forget which aspects of my computing environment require manual updating, and even when I remember them, recalling the proper update command invocation for each is an additional burden. The up command simplifies this process considerably.

Use Vundle to manage Vim plugins? Update them via:

up vundle

Update Python packages via:

up python

Update Vundle, Python, Homebrew, Fish completions, and others via:

up all

Extract

Similar to the above, it’s often hard to remember which command invocations to use when extracting compressed archives. Now you can simply use one simple command for a wide variety of file types:

extract archive.tar.xz

If you have Pixz and a compatible version of Tar (see respective docs for more detail), there’s also a handy compress command for fast compression of files and directories:

compress your-file-or-directory

Python virtual environments

If you previously used virtualenvwrapper to interact with Python virtual environments via Bash, in Fish you should use the Virtualfish module, which is bundled with Tackle. To create a new project in ~/Projects/ and a new virtual environment in ~/Virtualenvs/:

vf project your-project-name

If you already have an existing project, you can create just the virtual environment via:

vf new your-virtual-env-name

When you want to work on your project and activate its virtual environment:

workon your-project-name

Pip

If, like me, you prefer to restrict Pip to virtual environments so as to avoid accidentally installing a Python package into your global site-packages directory, it can be cumbersome when you occasionally want to invoke Pip globally. You can use the gpip command to make this easier. For example, to see whether Pip, Setuptools, Wheel, or other global packages are outdated:

gpip list --outdated

Closing remarks

These are just a few of the things Tacklebox and Tackle can do to make your Fish shell a more productive place to be. If you have any enhancement ideas, please submit an issue or pull request on the relevant repository. Also, follow me on Twitter to be notified when new handy features are added to Tacklebox and Tackle.


Viewing all articles
Browse latest Browse all 22462

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>