Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] new completion for otool command (macOS)



On 3 Jan 2018, at 21:31, Jun T <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:
>If there is a possibility that .dylib does not have an execution permission,
>then please add it to _object_files.

I don't have much experience with the other extensions you mentioned (except
.bundle is a directory i thought). But i did look at the .dylib files on my
machine, and it seems pretty well split on whether they'll be executable. Most
of the ones Apple ship in /usr/lib are, but over half of the ones i've got from
Homebrew are not. So i suppose it's worth adding it.

dana


diff --git a/Completion/Unix/Type/_object_files b/Completion/Unix/Type/_object_files
index 70b5b6688..595265116 100644
--- a/Completion/Unix/Type/_object_files
+++ b/Completion/Unix/Type/_object_files
@@ -5,7 +5,7 @@ local expl
 _description files expl 'object file'
 
 __object_file() {
-  [[ -x $REPLY || $REPLY = *.(a|o|elf) || $REPLY = *.so(.<->)# ||
+  [[ -x $REPLY || $REPLY = *.(a|o|elf|dylib) || $REPLY = *.so(.<->)# ||
 	$REPLY = (core*|*.core) ]]
 }
 



Messages sorted by: Reverse Date, Date, Thread, Author