Closed ngklingler closed 5 years ago
Hi @ngklingler, Thanks for the PR.
The source
builtin should be more capable than just loading rcfile. It should also run cicada scripts (which is not supported yet, see the two big todo in readme).
But reloading refile is a useful feature. We can merge this PR with the following adjust:
Check the input file, if it ends with "cicadarc"
, then reload the rc, otherwise, we print a hint that "scripting in cicada is still work in progress".
Can you add source
into src/completers/path.rs
around line 168. So cicada completion knows this new builtin.
Also a small item in Changelog would be great.
Hey @mitnk
Good call on those points. I changed the source commmand to check that the specified file ends in "cicadarc" if it does, we load the file; if it doesn't then it throws an error that only loading from cicadarc files is supported and scripting is a WIP. I added the source command to the completer, and I updated the changelog to mark this change. Let me know if anything else should be done.
Looks great! Thanks again!
Hey,
I noticed your shell does not have the
source
command as one of its builtins, which lets you source rc files during a session. It works like this: make a change to ~/.cicadarc, runsource ~/.cicadarc
, and any changes you made to your RC file will then be loaded. I was a pretty simple implementation, I just had to call theload_file
function in the rcfile module. I hope you will incorporate this into your project.