81 Commits

Author SHA1 Message Date
Mike McQuaid
ac84a4b051
Fix ZSH FPATH handling
Don't require it to be exported but shell out to `zsh` instead.

Fixes https://github.com/Homebrew/brew/issues/9387
2020-12-03 16:52:55 +00:00
Mike McQuaid
3002c810be
Improve ZSH completions handling
- Only display the completions caveats from the current shell (assuming
  it's one of Bash, ZSH or Fish)
- If the completions location isn't in the ZSH `FPATH` then link to the
  documentation explaining how to do so.

Fixes https://github.com/Homebrew/brew/issues/8984
2020-11-26 16:08:26 +00:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Markus Reiter
8957422d86 Document Caveats. 2020-08-26 03:13:58 +02:00
Mike McQuaid
3a91c37e66
Fix RuboCop checks. 2020-08-19 17:12:32 +01:00
Issy Long
341ea60807
Auto-fix Style/RedundantBegin offenses
- This also required auto-fixes for Layout/EmptyLinesAroundBlockBody and
  Layout/InconsistentIndentation once the auto-fixer had got rid of the
  "redundant begin"s.
2019-10-13 16:04:27 +01:00
Mike McQuaid
fc6bd2ea1c
Fixup more frozen string handling. 2019-04-20 14:07:29 +09:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
2e7a3f3da2
caveats: tweak wording/formatting. 2019-03-13 08:56:16 +00:00
Morgan Tocker
a1f24748e6 caveats: non-macOS platforms warn on services
Only currently supported by macOS. Attempting to use services
should produce a warning for now.  It is possible it might be
supported in the future.
2019-03-12 13:47:54 -06:00
Mike McQuaid
d64429a736
rubocop: enable Style/IfUnlessModifier. 2019-02-21 12:55:49 +00:00
Mike McQuaid
b89367e6d9 caveats: tweak keg_only_text
- make it a public method
- allow skipping the reason
- output how to set the various variables in your current shell
2018-07-26 10:49:07 +01:00
Mike McQuaid
9fca172d03 Fix HOMEBREW_RUBY_WARNINGS="-w"
Fix various circular requirements, method redefinitions, etc.
2018-04-07 20:28:56 +01:00
Mike McQuaid
36dadbee47 caveats: remove python caveats.
These instructions are currently incorrect and need to be ported to
`python` 3.x and `python@2` formulae. Until then it's better to not have
them than have them be incorrect.

Closes #3890.
2018-03-08 08:34:20 +00:00
Mike McQuaid
d54e670a64 requirements: move more to compat. 2017-12-30 20:56:55 +00:00
Mike McQuaid
cacefb2b99
caveats: tweak root_dir definition style. 2017-12-24 07:59:17 +00:00
Dominyk Tiller
92e62ba583
caveats: correct completion/function paths for keg_only 2017-12-23 23:15:59 +00:00
Dominyk Tiller
55d9750056
caveats: fix fish caveats under env filtering 2017-12-11 09:16:39 +00:00
Dominyk Tiller
d70a406fe7
caveats: fix PKG_CONFIG_PATH nudge under env filtering 2017-12-11 06:26:56 +00:00
Markus Reiter
0ea855c6e6 Add missing require "forwardable". 2017-10-24 19:39:40 +02:00
Markus Reiter
9bee9ca575 Use “squiggly” heredocs. 2017-10-18 14:39:09 +02:00
Maxim Belkin
336fbb5db2
caveats: making plist_caveats macOS-only 2017-10-16 11:15:54 -05:00
Mike McQuaid
01e9ec9a9f Rubocop: automatic rule fixes. 2017-09-24 21:23:59 +01:00
Misty De Meo
2bd8091ae8 Merge pull request #2804 from mansimarkaur/caveats
Increasing test coverage for caveats.rb
2017-07-25 09:28:46 -07:00
mansimarkaur
ae02b9776a Added tests for python caveats 2017-07-25 21:00:37 +05:30
mansimarkaur
9218d3014d Added tests for plist_caveats 2017-07-25 21:00:26 +05:30
mansimarkaur
5fba0c4776 Added tests for function_completion_caveats 2017-07-25 21:00:04 +05:30
Markus Reiter
3b4ee58c49 Refactor using Forwardable and DelegateClass. 2017-06-28 09:25:31 +02:00
Dominyk Tiller
c081b3d975
caveats: chomp keg_only reason 2017-05-02 19:03:03 +01:00
Dominyk Tiller
285b0bc941
caveats: tweak keg_only wording
Current:
```
This formula is keg-only, which means it was not symlinked into /usr/local.

Qt has CMake issues when linked
```

After:
```
This formula is keg-only, which means it was not symlinked into /usr/local,
because Qt has CMake issues when linked.
```
2017-05-01 16:56:16 +01:00
Mike McQuaid
ba3c46d24f More deprecations.
Deprecate more methods. Internal APIs have been verified to be unused
elsewhere and removed. External APIs have had deprecation methods added.
Existing deprecations have been either upgraded to produce warnings or
no longer deprecated and the reasoning documented.
2017-04-22 16:28:07 +01:00
Alex Dunn
00af5250f0 caveats: combine completion and function messages
Fixes https://github.com/Homebrew/homebrew-core/issues/10338.

Closes #2287.

Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
2017-03-19 16:32:23 -07:00
Mike McQuaid
7a2c5c0f2f caveats: add newline after keg only reason. 2017-01-26 15:18:32 +00:00
Mike McQuaid
cc22239c99 caveats: tweak keg-only messaging.
Slim down the existing text and make it more obvious what's happening.
Note specifically how to add it to your PATH to convince people to try
that instead of `brew link --force`.
2017-01-25 08:25:16 +00:00
Mike McQuaid
c0a29d6644 caveats, keg: remove linkapps caveats code. 2017-01-09 14:10:26 +00:00
Zach Whaley
14f46625a3 caveats: Differentiate zsh completion files and function files
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
2016-12-08 07:23:26 -06:00
Zach Whaley
1995f65308 Add a method for installing fish function files
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
2016-12-04 13:21:42 -06:00
Markus Reiter
a5b11a6a5c Fix Style/GuardClause. 2016-09-23 15:30:07 +02:00
Mike McQuaid
6693915399 rubocop --auto-correct all remaining files.
But remove some manual `.freeze`s on constants that shouldn't be
constants.
2016-09-17 16:14:13 +01:00
Dominyk Tiller
2394d6f2d8
caveats: highlight PKG_CONFIG_PATH if exists
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.
2016-09-11 04:49:09 +01:00
Martin Afanasjew
8600b9edf1 Update Homebrew/homebrew references in comments
Replace `homebrew` with `brew`, `homebrew-core`, or `legacy-homebrew`
depending on context.
2016-05-02 21:19:09 +02:00
ilovezfs
f54f27d621 Skip tmux warning if reattached to user namespace
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.
2016-04-30 16:33:16 -05:00
Mike McQuaid
26118d6225 caveats: recommend brew services for plists.
It simplifies the number of commands and it's now an officially
supported command again.
2016-04-22 09:48:34 +01:00
Xu Cheng
7c9dff1f1e plist_caveats: ensure it ending with newline
Closes Homebrew/homebrew#49374.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-21 12:15:31 +08:00
Alex Dunn
9b030d382c caveats: indent Emacs Lisp directory
This matches similar caveats messages.
2015-12-07 18:45:40 -08:00
Alex Dunn
168a2687f8 stricter audit for Emacs Lisp installs
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).
2015-11-01 17:34:28 -08:00
Xu Cheng
5b321ffb5a caveats: show information based on build options
Fixes Homebrew/homebrew#44729.
Fixes Homebrew/homebrew#40863.
Closes Homebrew/homebrew#44779.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-10 01:33:58 +08:00
Daniel Lee Harple
666ffe5a63 caveats: wrap elisp caveats
Closes Homebrew/homebrew#43517.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-09-04 16:03:48 +08:00
Alex Dunn
55d685f759 caveats.rb: don't print elisp_caveats for keg-only
Since they won't have been installed into `#{HOMEBREW_PREFIX}/share/emacs/site-lisp/`

Closes Homebrew/homebrew#42839.
2015-08-12 09:38:10 -07:00
Xu Cheng
b121e5fd7b more core file style updated by rubocop 2015-08-06 17:23:56 +08:00