-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
## Installation | ||
|
||
By default the CLI will follow the [XDG](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) specification | ||
and use `$XDG_CONFIG_HOME` for configuration files. | ||
|
||
If the path does not yet exist you can start by creating a `prompt` directory in your configuration path. | ||
For example: | ||
```sh | ||
mkdir -p ~/.config/prompt | ||
cd ~/.config/prompt | ||
``` | ||
|
||
You can then create a new `config.hs` file, which will be the entrypoint of your configuration. | ||
```hs | ||
import Prompt | ||
|
||
main = do | ||
run | ||
[ currentDirectoryModule, | ||
gitBranchModule | ||
] | ||
``` | ||
|
||
### Cloning from source | ||
In your `prompt` configuration directory, you can now clone the latest source code. | ||
```sh | ||
git clone https://github.com/matthunz/prompt | ||
``` | ||
|
||
### Building | ||
First create a new [stack](https://docs.haskellstack.org/en/stable/) project in the same configuration directory. | ||
``` | ||
stack init | ||
``` | ||
|
||
Then edit your `stack.yml` to include the `prompt` source code. | ||
```yml | ||
resolver: | ||
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/25.yaml | ||
|
||
packages: | ||
- prompt | ||
``` | ||
Finally, you can install the CLI with: | ||
``` | ||
stack install | ||
``` |