A collection of ZSH scripts that make my life easier
pyinit
/pyactivate
: Simple tools for managing python virtual environments.- Stores environment in a
.venv
folder.pyinit
to create and activate,pyactivate
to activate. pyinit <dirname>
creates an environment in<dirname>
, creating the directory if it doesn't exist.pyinit
without arguments creates an environment in the current directory.
- Stores environment in a
-
srczsh
re-sources~/.zshrc
. Pretty simple but saves some keystrokes. -
myip
echoes the IP address ofen0
. -
flag
is not mine, it's from @gpiper's gist from SO. It grabs the documentation for a specific flag from aman
page. -
cptemp
andmvtemp
create a new directory in/tmp/
in the formTEMP_XXXX
. They thencp
ormv
their arguments to the temp folder. If they're given the-n
flag, they will echo the new path. Otherwise, theycd
you into it. Useful for creating disposable testing environments. -
cltemp
removes all directories in/tmp/
that fit the formTEMP_XXXX
. It shows the contents of these directories usingtree(1)
to confirm first. If you don't have and don't want to installtree
, you can replace it with anls
or afind
. -
hl
is a simple tool for finding and highlighting text fromstdin
. It works like this:hl <color> <token>
. If given the-l
flag, it will highlight entire lines. It has definitions forred
,green
,yellow
,blue
,magenta
, andcyan
. You can also prepend ab
to those colors to change the background color (highlight) of the text: