pit-0.3.0: Account management tool.

Safe HaskellNone
LanguageHaskell2010

Pit

Synopsis

Documentation

get Source

Arguments

:: Text

a key

-> Value

default value

-> IO Value 

Tries to get the data by a key. If the data associated with the key is not found, open $EDITOR with the default value.

getValue Source

Arguments

:: FromJSON a 
=> Text

a key

-> IO (Maybe a) 

Gets the data by a key. If current profile is set to dev, this function tries to get the data from '~/.pit/dev.yaml'.

set Source

Arguments

:: Text

a key

-> IO () 

Sets new data. Open $EDITOR with the current value.

setValue Source

Arguments

:: ToJSON a 
=> Text

a key

-> a

new data

-> IO () 

Sets new data.

switch Source

Arguments

:: Text

new profile

-> IO () 

Switches the profile. The current profile is stored in '~/.pit/pit.yaml'. This function rewrites it.