puck
is a zsh
prompt
Work in progress 🧐
It'll look something like this:
~/Dev/Repo/Private/puck :git branch info here:
λ Typing commands goes here!
Q: Why would you do this in OCaml instead of just using
zsh
oroh-my-zsh
?A: Because I can?
A: OCaml is fun and building a simple program that outputs a string is good for learning more OCaml! I was inspired by
gbt
.
Project setup inspired by spin and modern-ocaml. Thanks to tmattio and Khady 🥳
Right now the only way to use puck
is to build from source:
npm i -g esy
git clone https://github.com/p1xelHer0/puck.git
cd puck
esy
This will install the OCaml
compiler and required dependencies, it might take some minutes. After the initial installation this will be much faster. esy
uses dune
behind the scenes, the de facto build system for OCaml
.
Build the puck
executable and source the puck.zsh
file to enable the prompt. See Build for more information.
esy build
# read the contents of ./puck.zsh
# in your .zshrc
source /path/to/puck/puck.zsh
Note: if you don't want to use
esy
for some reason then you can usedune
itself. If you have this opinion you problably know how to do it yourself 😘. I'm might look into getting this working with bothdune
andesy
in the future with proper documentation.
This project is built with and tested using
esy
with these versions:
- macOS Mojave Version
10.14.6
[email protected]
installed with[email protected]
zsh 5.3 (x86_64-apple-darwin18.0)
esy build
This will build puck
with the name main.exe
, the puck executable will be put in the ./_build/
folder. The complete path is:
./_build/default/bin/main.exe
esy test
This will run all unit tests. puck
uses alcotest for testing.
All unit tests can be found in the ./test
folder. The test runner executable is found under ./test/support/test_runner.ml
, test suits should be added there.
esy format
This will format all ml
and mli
files in the repository. puck
uses ocamlformat for formatting. The formatted changes will be shown in the output.