source: tools/auto-complete.md @ e37db112

ADTast-experimentalenumforall-pointer-decayjacob/cs343-translationpthread-emulationqualifiedEnum
Last change on this file since e37db112 was 0f3d844, checked in by Andrew Beach <ajbeach@…>, 5 years ago

Updates to cfa.nanorc. Added information on how to do some auto-completion in bash.

  • Property mode set to 100644
File size: 934 bytes
Line 
1Shell Auto Completion
2=====================
3
4tests/test.py
5-------------
6
7### Bash
8
9Short version: copy this into your .profile file:
10
11    _cfa_test() (
12        (case $3 in
13        (--continue|--debug|--install|--timout-with-gdb)
14            echo yes no;;
15        (--arch)
16            echo x86 x64;;
17        (-I|--include|-E|--exclude)
18            $1 --list-comp | tr ' ' '\n' | sed -e 's@/[^/]\+$@/@;t;d';;
19        (*)
20            $1 --list-comp;;
21        esac) | grep -Ewoe "$2[^[:space:]]*"
22    )
23    complete -C _cfa_test tests/test.py
24
25The long version includes reading the bash manual, check for the complete
26built-in and readline programmable completion for details on how these
27commands are used. You can copy-paste the results directily into your
28terminal to test them or put them in one of the initalization files so they
29are loaded at start-up.
30
31This particular script does not handle the comma seperated options.
32
33### Zsh
Note: See TracBrowser for help on using the repository browser.