Skip to content

macOS Support / Debugging help? #2

@paulreimer

Description

@paulreimer

Love this feature + your other plugin repos using it. Now that I've enabled this on my work computers (Linux), I really wish I could use it on my home laptop (macOS).

I think macOS is close enough to Linux that the same approach is possible, but I'm not sure how to accomplish it exactly. I think I have found the replacement for LD_PRELOAD:

export DYLD_INSERT_LIBRARIES=</path/to/librl_custom_function.dylib>
export DYLD_FORCE_FLAT_NAMESPACE=1

I also modified src/lib.rs to run dlopen(b"libreadline.dylib\0", ... (dylib instead of so)

.inputrc is also respected on macOS; again using .dylib extension instead of .so (and attempting to load using plugins rl_custom_isearch + fzf-tab-completion/readline as described in their repos).

When I run a command with dtruss/dtrace (the macOS equivalent of strace), I can see that librl_custom_function.dylib gets loaded, but NOT the function dylibs in .inputrc (e.g. librl_custom_complete.dylib, librl_custom_isearch.dylib are not loaded or even mentioned in the syscall trace).

So now I wonder about the $include function <fname> <lib path> syntax for .inputrc, which I cannot find documented anywhere. Can you explain a bit more about this part specifically (how you figured it out for Linux), and/or hazard a guess on making better progress with macOS?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions