This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Autocompleting paths within scripts

Hello community,

I am changing my remote file system to something more organized (based on Johny Decimal). This means that I have to go through the task of editing the paths in my scripts. I am now using vscode to connect to the remote server, which makes things easier. In order to make this even easier, I would like to be able to autocomplete paths from my own scripts (when editing them). Of course, hitting the tabulator just generates a tab instead of displaying the relative paths. Perhaps this is a stupid question, but does anyone know if there exist some manner of plugin or other option to autocomplete paths from scripts?

Thank you!

nano vim bash remote vscode

1 answer

Not really a Bioinformatics question but generally very useful: vim can do that

[type some prefix of path]<Ctrl-x><Ctrl-f>

This needs whitespace to work. Possibly, you would rather make your scripts more portable in the future by getting paths to binaries from loading the corresponding conda environment instead.

enter image description here

Yep, sorry, you are right it is not a bioinformatics question. I asked here because it relates with the work we do anyway.

Log in to answer this question.