Confbase / cfg

A tool to manage configuration files and use them in production.
https://confbase.com/cfg
Apache License 2.0
7 stars 6 forks source link

Implement relative paths in ls output #68

Closed Drake-Eidukas closed 5 years ago

Drake-Eidukas commented 5 years ago

Relative paths work so long as the config files are in the base directory, but since we store filenames without relative paths to the base directory, I couldn't get it to work for files within directories in the base. Here's the output:

drake@element:~/workspace/test_base$ cfg ls
## master
templates
config: config.yaml

instances
config_dev1.yaml: config
config_dev2.yaml: config
another_one.yaml: config
yet_another_one.yaml: config
yeet_another_one.yaml: config
yeeet_another_one.yaml: config
yeeeet_another_one.yaml: config
yeeeeet_another_one.yaml: config
yeeeeeet_another_one.yaml: config
yeeeeeeet_another_one.yaml: config
yeeeeeeeet_another_one.yaml: config
yeeeeeeeeet_another_one.yaml: config
yeeeeeeeeeet_another_one.yaml: config
not_another_one.yaml: config
yet_not_another_one.yaml: config
yeet_not_another_one.yaml: config
another_test_config.yaml: config
yet_another_test_config.yaml: config
testy.yaml: config
teesty.yaml: config
teeesty.yaml: config

singletons
.gitignore
drake@element:~/workspace/test_base$ mkdir -p lol/test/heck
drake@element:~/workspace/test_base$ cd lol/test/heck
drake@element:~/workspace/test_base/lol/test/heck$ cfg ls
## master
templates
config: ../../../config.yaml

instances
../../../config_dev1.yaml: config
../../../config_dev2.yaml: config
../../../another_one.yaml: config
../../../yet_another_one.yaml: config
../../../yeet_another_one.yaml: config
../../../yeeet_another_one.yaml: config
../../../yeeeet_another_one.yaml: config
../../../yeeeeet_another_one.yaml: config
../../../yeeeeeet_another_one.yaml: config
../../../yeeeeeeet_another_one.yaml: config
../../../yeeeeeeeet_another_one.yaml: config
../../../yeeeeeeeeet_another_one.yaml: config
../../../yeeeeeeeeeet_another_one.yaml: config
../../../not_another_one.yaml: config
../../../yet_not_another_one.yaml: config
../../../yeet_not_another_one.yaml: config
../../../another_test_config.yaml: config
../../../yet_another_test_config.yaml: config
../../../testy.yaml: config
../../../teesty.yaml: config
../../../teeesty.yaml: config

singletons
../../../.gitignore

53