Initial commit

This commit is contained in:
2023-01-22 17:21:52 +01:00
commit 133dcc8325
4 changed files with 884 additions and 0 deletions

26
README.md Normal file
View File

@@ -0,0 +1,26 @@
# vdn-tools
A collection of scripts for Virtual Didactic Network (VDN).
## Bash completion script
This script can complete the most commonly used commands in VDN like `vdn-ssh`, `vdn-start` or `vdn-scp`.
It can complete network and system names. Guest filenames can also be completed like the `scp` command.
### Locally
Source the `completion/vdn-completion.bash` file in your `.bashrc`:
```bash
. ~/path/to/completions/vdn-completion.bash
```
### Globally
Copy the `vdn-completion.bash` file in `/usr/local/share/bash-completion/completions/` and link all the commands:
```bash
cp completion/vdn-completion.bash /usr/local/share/bash-completion/completions/vdn
grep 'complete -F \w* [a-z-]*' -- completion/vdn-completion.bash | awk '{ print "/usr/local/share/bash-completion/completions/"$NF }' | xargs -I {} ln -s /usr/local/share/bash-completion/completions/vdn {}
```