When installing a file to zsh/site-functions directory, it is assumed this is a zsh completion file,
and the zsh completion caveat is printed after installation.
But not all files in the zsh/site-functions directory are completion files.
Some are files for functions that can be loaded on demand with zsh's autoload command.
- Edit Keg.completion_installed to search specifically for files in the zsh/site-functions
directory starting with an underscore only (By convention, zsh completion files start with an underscore)
- Add Keg.zsh_functions_installed to search for non-completion files in the zsh/site-functions
- Add Caveats.zsh_function_caveats to print a caveat if non-completion files have been installed
to zsh/site-functions
Fish shell allows third-party software vendors to put their own function files in a directory for their software.
For brew installed Fish shell, this is /usr/local/share/fish/vendor_functions.d
We keep getting issues every now & again about people being confused that
keg_only includes hiding the `pkg-config` files. Perhaps seems reasonable to
start pointing out those exist when they do & a hint on how to access them.
Hidden behind a which check to avoid redundant messages, although `pkg-config`
is an incredibly popular formula. Ran some time tests, no appreciable difference
from the status quo.
If accepted:
Closes https://github.com/Homebrew/homebrew-core/issues/4669.
The exit status of pbpaste is a proxy for whether the user has set up
reattach-to-user-namespace. It should be 0 if it is set up, 1 otherwise.
This is the same hack as Homebrew/homebrew-services#48.
Require that the subdirectory in site-lisp match the formula name
exactly. This lets us provide better information in the caveats and
will make it easier for helper methods to write to the correct
location (as in in Homebrew/homebrew-emacs#13).
- The name of the subdirectory under site-lisp may not be exactly the
same as the name of the package
- `(normal-top-level-add-subdirs-to-load-path)` adds every subdirectory
of `default-directory` to the load-path, so users don't have to update
their load-path for every package they install.
ClosesHomebrew/homebrew#42309.
* Library/Homebrew/caveats.rb: add caveats comparable to other shells
* Library/Homebrew/formula.rb: define completion directory along the
conventions explained in the fish documentation for
$fish_complete_path
* Library/Homebrew/keg.rb: add fish shell to check function for
installed completions
ClosesHomebrew/homebrew#39828.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
The `homebrew.pth` should be a file with a single line in it.
Also (at least on zsh) if the file does not exist, `>>` will
result in an error. The `>` works in both, bash and zsh and
creates the file with the `echo`ed contet.
ClosesHomebrew/homebrew#28201.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Symlinks in opt and LinkedKegs point directly at a keg in the cellar, so
only resolving one symlink should suffice, and make it clear what path
we are actually interested in.