Skip to content

Commit 2c0b1ed

Browse files
author
Chen Lihui
committed
to support complete for rosidl and avoid calling multiple compinit
Signed-off-by: Chen Lihui <[email protected]>
1 parent b8381d9 commit 2c0b1ed

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

rosidl_cli/colcon.pkg

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"hooks": [
3+
"share/rosidl_cli/environment/rosidl-argcomplete.bash",
4+
"share/rosidl_cli/environment/rosidl-argcomplete.zsh"
5+
]
6+
}

rosidl_cli/completion/rosidl-argcomplete.zsh

+2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
if ! type complete > /dev/null 2>&1; then
1516
autoload -U +X compinit && compinit
1617
autoload -U +X bashcompinit && bashcompinit
18+
fi
1719

1820
# Get this scripts directory
1921
__rosidl_cli_completion_dir=${0:a:h}

0 commit comments

Comments
 (0)