Syntax: lspace-setup /path/to/vault ?integrated | detached | indexed? |
---|
Creates a vault at the specified path, with the given type.
If no type is specified, integrated
is used.
Note, if the vault file already exists then no action is taken. Further the tool will not check that the type of the existing vault matches the requested type.
The tools prints all lspace commands invoked, and their output to the
standard output, as shell comments. This is followed by assignments to
various LSPACE_*
variables, with associated export
directives.
Using
eval $(lspace-setup ...)
in a shell script or terminal will thus configure the calling environment so thatlspace
and the various helper commands will automatically access the vault initialized by this command.Alternatively save the output to a file and source that file in a shell startup.
Another use is inclusion or invokation from within in
.envrc
files used bydirenv
to initialize custom environments.
Example of output:
# RUN: lspace content directory -D /home/aku/Play/Lspace/trial/index /home/aku/Play/Lspace/trial/index.store
# Vault: /home/aku/Play/Lspace/trial/index
# New store directory: /home/aku/Play/Lspace/trial/index.store
# RUN: lspace config -D /home/aku/Play/Lspace/trial/index
# Vault: /home/aku/Play/Lspace/trial/index
# +----------------+-----------------------------------------+
# | Vault Type | Detached |
# | Store Mode | content |
# | Store Path | /home/aku/Play/Lspace/trial/index.store |
# | Documents/Page | 20 |
# | Documents/Dex | 20 |
# | Searches/Dex | 20 |
# +----------------+-----------------------------------------+
export LSPACE_BASE="/home/aku/Play/Lspace/trial"
export LSPACE_VAULT="${LSPACE_BASE}/index"
export LSPACE_SCAN="${LSPACE_BASE}/index-scan"
export LSPACE_SHUN="${LSPACE_BASE}/index-shun"