Open tjortho opened 4 years ago
Yeah, so far tab completion has only been implemented for notebook and command names. This should improve as time permits.
If anyone reading this wants to expand the completion scripts, this would be a good way to contribute.
I've been working on improving completion on fish (#63). I will implement this feature on that PR (for fish only).
Tab completion of filenames fails to work with nb import.... Many of these are long filenames and paths, so it is a vital part of the workflow.
It appears the context for tab completion after typing "import" remains WITHIN the notebook structure, rather than the shell filesystem command line completion.
Workaround for the moment is to 'ls' with tab completion, then
nb import $!
Thanks for raising this issue. Could you explain how to implement the workaround? Are you piping the output of ls
to nb import or similar? I've tried that and can't get it to work. 🙏
@docsteveharris You should still be able to specify the filenames individually or using globbing:
# import "example.md" in the current directory
nb import example.md
# import "example.md" in the current directory and "sample.md" in the "demo" directory
nb import example.md demo/sample.md
# import all .md markdown files in the current directory
nb import *.md
# import all files in the "demo" directory
nb import demo/*
I like your intuition about piping filenames / paths to nb import
, so I just added that. It's available in the repo now and will be in the next point release.
Tab completion of filenames fails to work with nb import.... Many of these are long filenames and paths, so it is a vital part of the workflow.
It appears the context for tab completion after typing "import" remains WITHIN the notebook structure, rather than the shell filesystem command line completion.
Workaround for the moment is to 'ls' with tab completion, then
nb import $!