File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -252,6 +252,33 @@ WSL-based installation.
252
252
See [ here] ( INSTALL_FROM_SOURCE.md ) .
253
253
254
254
255
+ ## Shell Tab Completion
256
+
257
+ Tab completion is available for the following shells: Bash, Zsh, and Tcsh.
258
+
259
+ To enable tab completion, run the following command to generate the appropriate script:
260
+
261
+ ``` bash
262
+ fairseq2 --print-completion {bash| zsh| tcsh}
263
+ ```
264
+
265
+ You can either save the output to the shell's completion directory for permanent use or apply it directly to your current session.
266
+
267
+ For example, to enable Bash completion for the current session, use:
268
+ ``` bash
269
+ eval " $( fairseq2 --print-completion bash) "
270
+ ```
271
+
272
+ For a permanent setup, run the following command to store the completion script:
273
+ ``` bash
274
+ echo " eval $( fairseq2 --print-completion bash) " >> " $BASH_COMPLETION_COMPAT_DIR /shtab"
275
+ ```
276
+
277
+ Here, ` BASH_COMPLETION_COMPAT_DIR ` is the path to your system's shell completion directory.
278
+
279
+ This ensures that tab completion will be enabled every time you start a new shell session.
280
+
281
+
255
282
## Contributing
256
283
We always welcome contributions to fairseq2! Please refer to
257
284
[ Contribution Guidelines] ( CONTRIBUTING.md ) to learn how to format, test, and
You can’t perform that action at this time.
0 commit comments