$OpenBSD: patch-Completion_Unix_Command__readelf,v 1.1 2015/12/21 19:13:17 jasper Exp $

From 3272bdce987a3e5d5448688529ccb8290e148a67 Mon Sep 17 00:00:00 2001
From: Matthew Martin <phy1729@gmail.com>
Date: Fri, 11 Dec 2015 11:51:09 +0100
Subject: [PATCH] 37383: add completion type for object files

--- Completion/Unix/Command/_readelf.orig	Sun May  3 19:57:18 2015
+++ Completion/Unix/Command/_readelf	Mon Dec 21 09:54:57 2015
@@ -2,10 +2,6 @@
 
 local variant args sections
 
-_elf_file() {
-  [[ -x $REPLY || $REPLY = (core*|*.([ao]|so|elf)) ]]
-}
-
 sections=( .bss .data .dynamic .dynsym .got .interp .shstrtab .symtab .text )
 _pick_variant -r variant elftoolchain=elftoolchain elfutils=elfutils binutils --version
 
@@ -29,7 +25,7 @@ args=(
   '(-W --wide)'{-W,--wide}'[allow output width to exceed 80 characters]'
   '(- *)'{-H,--help}'[display help information]'
   '(- *)'{-v,--version}'[display version information]'
-  "*:elf file:_files -g '*(-.e:_elf_file:)'"
+  "*:elf file:_object_files"
 )
 
 case $variant in
