More intuitive linking + option to prepend '.'
Closed this issue · 2 comments
- Make
fs.link_file
more intuitive. (don't add.
by default) - Add option to prepend
.
when needed. (same forfs.link_files
)
That would break current package repositories. but we need an option to link without prepended .
for e.g. ~/.config
.config
is in most cases already there and filled with local configs but some configs should be global ones distributed by ellipsis. With the current implementation this is not nice/easy to achieve.
fs.link_files
and fs.link_file
with the option to disable prepended .
(getopts or similar)
fs.link_files
with target option
fs.link_files -d config ${ELLIPSIS_HOME}/.config/
Or create directories and just linking files
Hi Steven,
Thank you for your interest in the project!
It would indeed break current packages, that's why we didn't alter the current implementation.
( I discussed this with Zach (@zeekay) on gitter)
At the time I made this issue it wasn't possible to use fs.link_file
without the auto prepending of the dot. This was due to an error in the implementation. Since this has been fixed you can use the function without it if you specify the destination path including the file name (without the dot).
So the following command does as expected; fs.link_file test ${HOME}/test
And will link to test without a dot. (This might not be documented properly?)
Making directories and linking all files from a directory should be fairly easy with a few lines of bash.
There are definitely some possibilities for improvement in the API when it comes to linking (and a lot of other stuff). This is also the reason why this issue is still open! Until now it just hasn't been a priority, and we fixed/changed more important things first.
All ideas and comments welcome! (PR's even more)