From ea4685a96f2c5d696dd4d491c0d7879babd37295 Mon Sep 17 00:00:00 2001 From: "Wu, Zhenyu" Date: Fri, 10 May 2024 10:16:27 +0800 Subject: [PATCH] Add cgdb completion --- src/_cgdb | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/_cgdb diff --git a/src/_cgdb b/src/_cgdb new file mode 100644 index 00000000..544335e2 --- /dev/null +++ b/src/_cgdb @@ -0,0 +1,28 @@ +#compdef cgdb +# ------------------------------------------------------------------------------ +# Description +# ----------- +# +# Completion script for cgdb (https://github.com/cgdb/cgdb). +# Modified from rejected https://github.com/cgdb/cgdb/pull/337/ +# +# ------------------------------------------------------------------------------ +# Authors +# ------- +# +# * Wu, Zhenyu +# +# ------------------------------------------------------------------------------ + +# cgdb -- +if ((${${words[1, CURRENT]}[(I)--]})) && [[ ${words[CURRENT]} != -- ]]; then + _gdb +# cgdb or cgdb -- or cgdb -- +else + _arguments -s \ + "(- : *)"{-v,--version}"[Print version information and then exit.]" \ + "(- : *)"{-h,--help}"[Print help (this message) and then exit.]" \ + -d"[Set debugger to use.]" \ + -w"[Wait for debugger to attach before starting.]" \ + -- +fi