Skip to content

Commit 660e57d

Browse files
committed
tutorial/0-completion: mention the way to enable bash completion for argsparse scripts
1 parent e830537 commit 660e57d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tutorial/0-completion

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,18 @@ printf "You are currently in %s directory and completion is enabled.\\\\n" \
2121
printf "Try:\\\n\\\\n./1-basics -<tab><tab>\\\\n\\\\n"
2222
EOF
2323
exec bash --rcfile <(printf %s "$bashrc") -i
24+
25+
cat <<EOF
26+
27+
As you can see, the Bash Argsparse Completion module can automatically
28+
enable the bash completion for the scripts you develop with the Bash
29+
Argsparse library.
30+
31+
To enable completion for your own scripts, please ensure
32+
bash_completion is enabled, and then in your ~/.bashrc, add lines such
33+
as:
34+
35+
. argsparse-completion.sh
36+
complete -F _argsparse_complete yourscript your_other_script
37+
38+
EOF

0 commit comments

Comments
 (0)