blob: 95d31d0ee1aa12e4128ce40797e964e5166eb62e [file] [log] [blame]
Matteo Scandoloa42dd352019-09-30 15:46:43 -07001/*
2 * Copyright 2019-present Ciena Corporation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package completion
17
18const Bash = `
Joey Armstrong4d6878e2024-02-08 16:29:26 -050019# Portions Copyright 2019-2024 Open Networking Foundation (ONF) and the ONF Contributors
Matteo Scandoloa42dd352019-09-30 15:46:43 -070020# Original copyright 2019-present Ciena Corporation
21#
22# Licensed under the Apache License, Version 2.0 (the "License");
23# you may not use this file except in compliance with the License.
24# You may obtain a copy of the License at
25#
26# http://www.apache.org/licenses/LICENSE-2.0
27#
28# Unless required by applicable law or agreed to in writing, software
29# distributed under the License is distributed on an "AS IS" BASIS,
30# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31# See the License for the specific language governing permissions and
32# limitations under the License.
33#
34_bbsimctl() {
35 # All arguments except the first one
36 args=("${COMP_WORDS[@]:1:$COMP_CWORD}")
37 # Only split on newlines
38 local IFS=$'\n'
39 # Call completion (note that the first element of COMP_WORDS is
40 # the executable itself)
41 COMPREPLY=($(GO_FLAGS_COMPLETION=1 ${COMP_WORDS[0]} "${args[@]}"))
42 return 0
43}
44complete -F _bbsimctl bbsimctl`