OLD | NEW |
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # Add programmable completion to some Chromium OS build scripts | 5 # Add programmable completion to some Chromium OS build scripts |
6 | 6 |
7 | 7 |
8 # Echo a list of -- flags that the current command accepts. The | 8 # Echo a list of -- flags that the current command accepts. The |
9 # function assumes that the command supports shflags' --help flag. | 9 # function assumes that the command supports shflags' --help flag. |
10 # | 10 # |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 return 0 | 82 return 0 |
83 fi | 83 fi |
84 return 1 | 84 return 1 |
85 } | 85 } |
86 | 86 |
87 # Completion for --board= argument for existing board sysroots | 87 # Completion for --board= argument for existing board sysroots |
88 # | 88 # |
89 _board_sysroot() | 89 _board_sysroot() |
90 { | 90 { |
91 _flag_complete && return 0 | 91 _flag_complete && return 0 |
92 _complete_board_flag && return 0 | 92 _complete_board_sysroot_flag && return 0 |
93 } | 93 } |
94 | 94 |
95 complete -o bashdefault -o default -F _board_sysroot \ | 95 complete -o bashdefault -o default -F _board_sysroot \ |
96 build_autotest.sh \ | 96 build_autotest.sh \ |
97 build_image \ | 97 build_image \ |
98 build_packages \ | 98 build_packages \ |
99 image_to_usb.sh \ | 99 image_to_usb.sh \ |
100 mod_image_for_test.sh | 100 mod_image_for_test.sh |
101 | 101 |
102 | 102 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 fi | 149 fi |
150 | 150 |
151 _complete_board_sysroot_flag && return 0 | 151 _complete_board_sysroot_flag && return 0 |
152 } | 152 } |
153 | 153 |
154 complete -o bashdefault -o default -o nospace -F _autotest_complete autotest | 154 complete -o bashdefault -o default -o nospace -F _autotest_complete autotest |
155 | 155 |
156 ### Local Variables: | 156 ### Local Variables: |
157 ### mode: shell-script | 157 ### mode: shell-script |
158 ### End: | 158 ### End: |
OLD | NEW |