about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/.distfiles1
-rw-r--r--Completion/Unix/Command/_ldd32
-rw-r--r--Completion/Unix/Type/.distfiles2
-rw-r--r--Completion/Unix/Type/_ld_debug39
5 files changed, 78 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 51ae7e03f..fed190c86 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-28  Oliver Kiddle  <opk@zsh.org>
+
+	* 23611: Completion/Unix/Command/_ldd, Completion/Unix/Type/_ld_debug:
+	new completions for ldd and LD_DEBUG on Solaris and Linux
+
 2007-06-28  Clint Adams  <clint@zsh.org>
 
 	* 23610: Completion/Unix/Command/_git: merge in from Nikolai
diff --git a/Completion/Unix/Command/.distfiles b/Completion/Unix/Command/.distfiles
index 11d4127fe..46aa747f3 100644
--- a/Completion/Unix/Command/.distfiles
+++ b/Completion/Unix/Command/.distfiles
@@ -2,6 +2,7 @@ DISTFILES_SRC='
 .distfiles
 _a2ps           _elinks         _kvno           _perldoc        _surfraw
 _aap            _elm            _last           _php            _sysctl
+                                _ldd
 _ant            _enscript       _less           _pine           _tar
 _antiword       _env            _links          _ping           _tardy
 _apachectl      _fakeroot       _loadkeys       _pkg-config     _tcptraceroute
diff --git a/Completion/Unix/Command/_ldd b/Completion/Unix/Command/_ldd
new file mode 100644
index 000000000..e739181d6
--- /dev/null
+++ b/Completion/Unix/Command/_ldd
@@ -0,0 +1,32 @@
+#compdef ldd
+
+if _pick_variant gnu=GNU solaris --version; then
+  args=(
+    '(- *)--version[display version information]'
+    '(- *)--help[display help information]'
+    '(-v --verbose)'{-v,--verbose}'[include symbol versioning information]'
+    '(-d --data-relocs)'{-d,--data-relocs}'[perform data relocations and report missing objects]'
+    '(-f --function-relocs)'{-f,--function-relocs}'[perform data/function relocations and report missing objects]'
+    '(-u --unused)'{-u,--unused}'[display any unused objects]'
+  )
+else
+  args=(
+    -s
+    '(-r)-d[check immediate references]'
+    '(-d)-r[check immediate and lazy references]'
+    '-u[display any unused objects]'
+    '-U[display any unreferenced, or unused dependencies]'
+    '-e[set specified environment variable]:environment variable:(LD_PRELOAD LD_LIBRARY_PATH LD_RUN_PATH LD_DEBUG LD_DEBUG_OUTPUT LD_NOCONFIG LD_NOAUXFLTR)'
+    '-f[check for insecure executable]'
+    '-i[display order of execution of initialization sections]'
+    '-L[enable lazy loading]'
+    '-l[force immediate processing of any filters]'
+    '-s[display search path used]'
+    '-v[displays all dependency relationships]'
+  )
+fi
+
+_arguments $args \
+  '*: : _alternative
+    "executables:executable:_files -g \^\*.so\(\*\)"
+      "shared-objects:shared object:_files -g \*.so"'
diff --git a/Completion/Unix/Type/.distfiles b/Completion/Unix/Type/.distfiles
index b5fc39b24..713e0e8c2 100644
--- a/Completion/Unix/Type/.distfiles
+++ b/Completion/Unix/Type/.distfiles
@@ -2,7 +2,7 @@ DISTFILES_SRC='
 .distfiles
 _arch_archives       _arch_namespace      _canonical_paths
 _bind_addresses
-_dict_words          _list_files
+_dict_words          _ld_debug            _list_files
 _mailboxes           _perl_modules        _tex
 _diff_options        _my_accounts         _pids                _texi
 _dir_list            _newsgroups          _ports               _tilde_files
diff --git a/Completion/Unix/Type/_ld_debug b/Completion/Unix/Type/_ld_debug
new file mode 100644
index 000000000..94593eff0
--- /dev/null
+++ b/Completion/Unix/Type/_ld_debug
@@ -0,0 +1,39 @@
+#compdef -value-,LD_DEBUG,-default-
+
+local vals
+
+vals=(
+  'libs[display library search paths]'
+  'files[show processing of files and libraries]'
+  'bindings[display symbol binding]'
+  'reloc[display relocation processing]'
+  'symbols[display symbol table processing]'
+  'unused[show unused files]'
+  'versions[show version processing]'
+  'help[display help message]'
+)
+
+case $OSTYPE in
+  solaris*)
+    vals+=(
+      'basic[provide basic trace information/warnings]'
+      'cap[display hardware/software capability processing]'
+      'detail[provide more info in conjunction with other options]'
+      'demangle[display C++ symbol names in their demangled form]'
+      'init[display init and fini processing]'
+      'long[display long object names without truncation]'
+      'move[display move section processing]'
+      'segments[display available output segments and address/offset processing]'
+      'strtab[display information about string table compression]'
+      'tls[display TLS processing info]'
+    )
+  ;;
+  linux*)
+    vals+=(
+      'all[combine all options]'
+      'statistics[display relocation statistics]'
+    )
+  ;;
+esac
+_values -s , capability $vals
+