diff options
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Unix/Command/.distfiles | 1 | ||||
-rw-r--r-- | Completion/Unix/Command/_nm | 29 |
2 files changed, 30 insertions, 0 deletions
diff --git a/Completion/Unix/Command/.distfiles b/Completion/Unix/Command/.distfiles index 22e0a4fbe..a89b7d923 100644 --- a/Completion/Unix/Command/.distfiles +++ b/Completion/Unix/Command/.distfiles @@ -141,6 +141,7 @@ _mysqldiff _ncftp _netcat _nice +_nm _nmap _notmuch _npm diff --git a/Completion/Unix/Command/_nm b/Completion/Unix/Command/_nm new file mode 100644 index 000000000..276a38f19 --- /dev/null +++ b/Completion/Unix/Command/_nm @@ -0,0 +1,29 @@ +#compdef nm + +# This is a stub. It's main reason for existence is to offer +# object files with nm. Feel free to extend it. If you do, remove +# this comment. + +local state context line expl +local -A opt_args +local -a args +integer ret=1 + +if _pick_variant gnu='Free Soft' unix --version; then + args+=(-s --) +fi +args+=('*:file:->file') + +_arguments "$args[@]" && ret=0 + +case $state in + (file) + _alternative \ + "object-files:object file:_path_files -g '*.o'" \ + "executable-files:executable file:_path_files -g '*(*)'" \ + "dynamic-libraries:dynamic library:_path_files -g '*.so'" \ + "static-libraries:static library:_path_files -g '*.a'" && ret=0 + ;; +esac + +return ret |