Giter Site home page Giter Site logo

puck's Introduction

๐Ÿข puck

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 or oh-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

Project setup inspired by spin and modern-ocaml. Thanks to tmattio and Khady ๐Ÿฅณ

Installation

Right now the only way to use puck is to build from source:

  • puck uses esy to install and manage dependencies

  • esy is installed using npm or yarn

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 use dune itself. If you have this opinion you problably know how to do it yourself ๐Ÿ˜˜. I'm might look into getting this working with both dune and esy in the future with proper documentation.

This project is built with and tested using esy with these versions:

Build, test, formatting and more with puck

Build

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

Testing

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.

Formatting

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.

puck's People

Contributors

p1xelher0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

aitoroses

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.