New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fast and functional replacement for __fish_describe_command for Macos #7365
Conversation
If needed in other parts of the codebase, the /usr/bin/grep -i "\b$argv\b" ~/.whatis.db |
Are you sure? Is the format actually line-based like that, or is that just a coincidence? What if $argv occurs in other parts of the line? I'd rather pass the db to whatis, if at all possible |
I actually found a way where we can use the system |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks alright to me, if someone on macOS could confirm that it works that would be lovely.
This is great! The only issue I see is that the |
@ridiculousfish that makes a lot of sense. Thanks! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Should be fixed by [1]. [1]: fish-shell/fish-shell#7365
Description
Macos no longer comes with a whatis database, which makes
__fish_describe_command
and__fish_complete_man
command very slow, sinceapropos
rebuilds the database every time it is invoked.Trying to update the whatis database as root also doesn't work, because it's on a read only file system.
The solution I implemented, simply creates a whatis database in the user directory at
~/.cache/fish/whatis
The whatis cache is being updated at most once a day.
The result of these changes on macos are:
Fixes issues #6270, #6611, #6615 and possibly others.
TODOs: