diff options
author | Camil Staps | 2018-10-23 10:30:31 +0200 |
---|---|---|
committer | Camil Staps | 2018-10-23 10:30:31 +0200 |
commit | 1c05f9593fbb0c55313b7840e37912ae33a028c5 (patch) | |
tree | b8964e15ebf82eeb588e68c9348ee9d17a264536 /clean | |
parent | Add undocumented options to clm completion (diff) |
Move Clean completion to separate repository
Diffstat (limited to 'clean')
-rw-r--r-- | clean/.bash_completion.d/clm | 50 | ||||
-rwxr-xr-x | clean/bin/install_clean | 6 |
2 files changed, 6 insertions, 50 deletions
diff --git a/clean/.bash_completion.d/clm b/clean/.bash_completion.d/clm deleted file mode 100644 index 9eb873d..0000000 --- a/clean/.bash_completion.d/clm +++ /dev/null @@ -1,50 +0,0 @@ -_clm() -{ - local cur prev opts - COMPRREPLY=() - cur="${COMP_WORDS[COMP_CWORD]}" - prev="${COMP_WORDS[COMP_CWORD-1]}" - - opts="-I -IL -P -w -nw -d -nd -sa -nsa -mv -ms -O -PO -S -PS -ABC -PABC -c -lt -nlt -lat -nlat -lset -ci -nci -ou -nou -fusion -nfusion -pt -npt -desc -exl -tst -funcmayfail -varnotused -funcnotused -nowarn -ns -no-opt-link -l -sl -e -E -aC -h -s -b -sc -t -nt -gc -ngc -st -nst -nr -gcm -gcc -gcf -gci -dynamics -nortsopts -p -pic -optabc -bytecode" - - case $prev in - "-IL") - # Complete Clean libraries - opts="$(find "$CLEAN_HOME/lib" -mindepth 1 -maxdepth 1 -type d -exec basename {} \;)" - COMPREPLY=($(compgen -W "$opts" -- $cur)) - return 0 - ;; - "-I") - # Complete directories - _filedir - for index in "${!COMPREPLY[@]}"; do - [ -d "${COMPREPLY[index]}" ] || unset -v 'COMPREPLY[$index]' - done - return 0 - ;; - "-l" | "-sl") - # Complete files - _filedir - for index in "${!COMPREPLY[@]}"; do - [ -f "${COMPREPLY[index]}" ] || unset -v 'COMPREPLY[$index]' - done - return 0 - ;; - "-P" | "-e" | "-E" | "-h" | "-s" | "-gcf" | "-gci") - # Complete nothing - return 0 - ;; - esac - - if [[ $cur == -* ]]; then - # Complete options - COMPREPLY=($(compgen -W "$opts" -- $cur)) - return 0 - else - # Main module; complete icl module names - opts="$(find -name '*.icl' -maxdepth 4 -type f -print 2>/dev/null | sed 's:^\./::;s:/:.:g;s:\.icl$::' | grep -v '[- ]')" - COMPREPLY=($(compgen -W "$opts" -- $cur)) - return 0 - fi -} -complete -F _clm clm diff --git a/clean/bin/install_clean b/clean/bin/install_clean index 461dc14..cc19da6 100755 --- a/clean/bin/install_clean +++ b/clean/bin/install_clean @@ -20,8 +20,14 @@ sed -i 's=lib/exe/linker=lib/exe/linker:-no-pie=' /opt/clean/etc/IDEEnvs mv /opt/clean/lib/exe /opt/clean/exe ln -s /opt/clean/exe /opt/clean/lib/exe +# cloogletags cloogletags -a -c -d /opt/clean/lib -o /opt/clean/lib/tags +# completion +mkdir -p /opt/clean/etc/completion +ln -s /home/camil/VersionControl/clean-completion/clm /opt/clean/etc/completion +ln -s /home/camil/VersionControl/clean-completion/cpm /opt/clean/etc/completion + # clm rm /opt/clean/bin/clm; ln -s /home/camil/VersionControl/clean-tools-git/clm/clm /opt/clean/bin/clm # clean-test |