summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-10-15 11:24:21 +0100
committerPeter Stephenson <pws@zsh.org>2015-10-15 11:24:21 +0100
commit21b6852b15c563c434ae053b71d109e4c6010479 (patch)
treec60b9f77586cdea0990307b8c8cbd51a50a4ac7f
parent827d36077641ca87d1796b9c5cb05e7c44b01919 (diff)
downloadzsh-21b6852b15c563c434ae053b71d109e4c6010479.tar.gz
zsh-21b6852b15c563c434ae053b71d109e4c6010479.tar.xz
zsh-21b6852b15c563c434ae053b71d109e4c6010479.zip
36864: new objdump completion and tweak to nm completion
-rw-r--r--ChangeLog6
-rw-r--r--Completion/Unix/Command/_nm2
-rw-r--r--Completion/Unix/Command/_objdump8
3 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f0c88c979..c84b643b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-10-15  Peter Stephenson  <p.stephenson@samsung.com>
+
+	* 36864: Completion/Unix/Command/_nm,
+	Completion/Unix/Command/_objdump: new objdump completion plus
+	tweak to _nm.
+
 2015-10-14  Barton E. Schaefer  <schaefer@zsh.org>
 
 	* 36853: Src/exec.c: replace pushheap/popheap by NEWHEAPS/OLDHEAPS
diff --git a/Completion/Unix/Command/_nm b/Completion/Unix/Command/_nm
index 80136329d..d171ef5a3 100644
--- a/Completion/Unix/Command/_nm
+++ b/Completion/Unix/Command/_nm
@@ -6,7 +6,7 @@ _nm_object_file() {
   [[ -x $REPLY || $REPLY = *.([ao]|so|elf) ]]
 }
 
-files="*:object file:_files -g '*(-.e:_nm_object_file:)'"
+files="*:object file:_files -g '*(-.e,_nm_object_file,)'"
 args=(
   '(-A -o --print-file-name)'{-A,-o,--print-file-name}'[print name of input file on each line]'
   '(--demangle)-C[decode symbol names]'
diff --git a/Completion/Unix/Command/_objdump b/Completion/Unix/Command/_objdump
new file mode 100644
index 000000000..607719a19
--- /dev/null
+++ b/Completion/Unix/Command/_objdump
@@ -0,0 +1,8 @@
+#compdef objdump
+
+# borrowed from _nm_object_file
+_objdump_object_file() {
+  [[ -x $REPLY || $REPLY = *.([ao]|so|elf) ]]
+}
+
+_arguments -- '*:object file:_files -g "*(-.e,_objdump_object_file,)"'