Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.22 KB | None | 0 0
  1. # bash completion for lld linker -*- shell-script -*-
  2.  
  3. _ld.lld()
  4. {
  5. local cur prev words cword
  6. _init_completion -n = || return
  7.  
  8. case $cur in
  9. -v|-V|--version|--help)
  10. return
  11. ;;
  12.  
  13. --build-id=*)
  14. COMPREPLY=( $(compgen -W 'fast md5 sha1 uuid' -- "${cur#*=}") )
  15. return
  16. ;;
  17.  
  18. --color-diagnostics=*)
  19. COMPREPLY=( $(compgen -W 'auto always never' -- "${cur#*=}") )
  20. return
  21. ;;
  22.  
  23. --compress-debug-sections=*)
  24. COMPREPLY=( $(compgen -W 'none zlib' -- "${cur#*=}") )
  25. return
  26. ;;
  27.  
  28. --format=*)
  29. COMPREPLY=( $(compgen -W 'elf binary default' -- "${cur#*=}") )
  30. return
  31. ;;
  32.  
  33. --hash-style=*)
  34. COMPREPLY=( $(compgen -W 'sysv gnu both' -- "${cur#*=}") )
  35. return
  36. ;;
  37.  
  38. --lto-O*)
  39. COMPREPLY=( $(compgen -W '0 1 2 3' -- "${cur#*O}") )
  40. return
  41. ;;
  42.  
  43. --orphan-handling=*)
  44. COMPREPLY=( $(compgen -W 'place warn error' -- "${cur#*=}") )
  45. return
  46. ;;
  47.  
  48. --pack-dyn-relocs=*)
  49. COMPREPLY=( $(compgen -W 'android relr' -- "${cur#*=}") )
  50. return
  51. ;;
  52.  
  53. --plugin-opt=*)
  54. COMPREPLY=( $(compgen -W 'O0 O1 O2 O3' -- "${cur#*=}") )
  55. return
  56. ;;
  57.  
  58. --rsp-quoting=*)
  59. COMPREPLY=( $(compgen -W 'posix windows' -- "${cur#*=}") )
  60. return
  61. ;;
  62.  
  63. --sort-section=*)
  64. COMPREPLY=( $(compgen -W 'alignment name' -- "${cur#*=}") )
  65. return
  66. ;;
  67.  
  68. --target2=*)
  69. cur=${cur#*=}
  70. COMPREPLY=( $(compgen -W 'rel abs got-rel' -- "${cur#*=}") )
  71. return
  72. ;;
  73.  
  74. --call-graph-ordering-file=*|--Map=*|--plugin-opt=dwo_dir=*|--retain-symbols-file=*|--script=*|--version-script=*|--thinlto-cache-dir=*)
  75. cur=${cur#*=}
  76. _filedir
  77. return
  78. ;;
  79.  
  80. esac
  81.  
  82.  
  83. COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") )
  84. [[ $COMPREPLY == *= ]] && compopt -o nospace
  85. } &&
  86. complete -F _ld.lld ld.lld
  87.  
  88. # ex: filetype=sh
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement