43 Commits

Author SHA1 Message Date
Issy Long
31d7bcc583
Add a last_reviewed_date to docs metadata
- At the AGM we formed an ad-hoc documentation working group.
- One of our ideas was that we should have a last reviewed date for
  documentation, so that we can periodically implement a review
  mechanism (GitHub Actions posts to Slack for a regular documentation
  outdatedness check?) to track how old docs are and ensure they're
  still relevant.
- This is a first step towards that goal, by adding a `last_review_date`
  to the metadata of all docs with a date of earlier than Homebrew's
  inception because everything needs reviewing so that we start from a
  good base!
2025-02-03 11:56:07 +00:00
Ruoyu Zhong
94426ba18b
docs/Shell-Completion: update Zsh completions docs for Linux 2024-10-15 03:20:50 +08:00
Ruoyu Zhong
aea87757ff
docs/Shell-Completion: update docs for Zsh completions 2024-10-15 03:20:50 +08:00
Maria José Solano
7eebe3c1b4
fix(docs): update fish completions command 2023-10-28 18:14:04 -07:00
Lucas Astrada
a58dffc636
Reword suggestion to be more clear of command placement
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2022-10-27 13:26:11 -03:00
Lucas Astrada
d1d332aed8 Fix Oh-My-Zsh suggested configuration breaking completions on non-login shells 2022-10-26 21:31:52 -03:00
EricFromCanada
67f6f29675
docs: section 1 wording/formatting fixes 2022-10-20 09:35:42 -04:00
EricFromCanada
b71644e735
Update Shell-Completion.md 2021-12-02 22:59:00 -05:00
EricFromCanada
77efcdf8fb
Add & remove line breaks 2021-12-02 22:58:31 -05:00
XuehaiPan
3f96d963f7 style: fix inconsistent code style for shell scripts 2021-09-15 14:59:01 +08:00
David Bailey
39cdf234a2
Remove diff formatting (keep only relevant line) + clarify to append the line after initialization 2021-01-20 15:30:03 +00:00
David Bailey
a04b4890a9
Remove unneeded export
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-01-20 15:24:51 +00:00
David Bailey
5bb1556246 Suggest alternative method for enabling ZSH completions 2021-01-20 12:28:49 +00:00
Rylan Polster
e7b369273a completions: link official taps automatically 2021-01-11 12:27:57 -05:00
Rylan Polster
74787ca0ee docs: update shell completions instructions 2021-01-08 11:26:33 -05:00
Zachary Moon
8dcd2d2ba8
Add a missing backtick 2021-01-02 13:38:31 -05:00
Hoàng Xuân Phú
9725e85357
chmod recursively to satisfy zsh "insecure directories" warning
without `-R` only `share` is updated, leaving `share/zsh/site-functions` unchanged, so the warning won't go away
2020-09-18 11:27:39 -04:00
Ishan Goel
c94196c073
Brevity
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-07-21 12:49:00 +04:00
Ishan Goel
f7580f109e
Answer what profile file should be used clearer
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-07-21 12:45:45 +04:00
Ishan Goel
a613c1acd2
Make stuff clearer, grammar stuff. 2020-07-21 06:22:44 +04:00
Ishan Goel
5a992f1194
Remove quoted completion one-liner 2020-07-21 06:18:20 +04:00
Ishan Goel
4872d6653f
Recommend bash-completion unless user has newer bash 2020-07-20 18:24:01 +04:00
Ishan Goel
f9d77c9d89
Clarify which file the completion code should be added to
Co-authored-by: Shaun Jackman <sjackman@gmail.com>
2020-07-16 21:11:35 +04:00
Ishan Goel
7115427e78
Recommend commenting out the formula Caveats code 2020-07-16 18:03:51 +04:00
Ishan Goel
9ae1c1aafa
Make Shell-Completion.md clearer and update it 2020-07-16 14:21:15 +04:00
Adrian Ho
125ed8cf93
Update Shell-Completion.md 2020-07-03 20:24:50 +08:00
Adrian Ho
7f651de7be
Add completion configuration for non-Homebrew fish
Tested on Ubuntu 18.04 LTS
2020-07-03 19:28:45 +08:00
Shaun Jackman
133ee7966d shell: Use .profile unless .bash_profile exists 2020-05-13 09:30:02 -07:00
Kreig Zimmerman
6902073984 docs(Shell-Completion.md): modified conditional for .zshrc to include call to compinit 2020-02-21 17:28:24 -05:00
Andy Lester
953a1bf20b Add quotes around the brew invocation 2019-10-11 08:51:43 -05:00
Andy Lester
c296c5f2d3
bash completion should not call brew if brew doesn't exist
In the section "Configuring Completions in `bash`", there's a line of code that sets `HOMEBREW_PREFIX` by calling `brew --prefix`, but it's done before calling `type brew` to see if brew exists.  This gives a "-bash: brew: command not found" if you don't have brew installed. That line should be moved inside the `if`.
2019-10-02 09:00:23 -05:00
Lawrence
109d2a6d0e Deleted comment in parentheses 2019-09-07 18:21:01 -04:00
Lawrence
994d92ab32 Fixed website documentation to mark that brew provides fish completions 2019-09-07 17:26:15 -04:00
EricFromCanada
56263791c8 docs: account for bash-completion in suggested script
This runs the `bash-completion` initialization script if available, and loads each file in `{etc}/bash_completion.d` otherwise.
2019-07-24 15:54:07 -04:00
Matthew Rothenberg
dc30e9f64d
speedup bash completion loading suggestion in docs
The current suggestion for users shells out to `brew --prefix` three separate times, which has a non-zero overhead (as per quick benchmark below, approx 20ms per invocation). By making a minor change, the first invocation can be stored in a local variable to reduce shell startup time.

```
$ hyperfine --warmup=3 'brew --prefix'       
Benchmark #1: brew --prefix
  Time (mean ± σ):      21.3 ms ±   1.5 ms    [User: 8.8 ms, System: 10.6 ms]
  Range (min … max):    20.3 ms …  37.0 ms    128 runs
```
2019-05-07 12:36:02 -04:00
Mike McQuaid
439283c3df
Shell-Completion: recommend .bash_profile
`.bashrc` is not the right location for shell completions.
2019-03-30 10:01:16 +00:00
Mike McQuaid
ea379a84a6
Shell-Completion: fix redirection.
Fixes the issue noted in https://github.com/Homebrew/brew/pull/5625.
2019-02-21 16:25:47 +00:00
Mike McQuaid
f8c574bbc0
docs/Shell-Completion: read both types of bash completions.
And guard against either of them being missing.

Fixes #5610
2019-01-28 16:36:07 +00:00
Ian Max Andolina
030ddc9762
Update Shell-Completion.md
Please see https://discourse.brew.sh/t/bash-completion-and-brew-instructions-for-setting-up-completions/3808 for details...
2019-01-09 09:08:32 +08:00
Richard Schneeman
1dcf8c689c
Update bash completion docs
When I try to run the proposed script in my `~/.bashrc` file I get this output:

```
-bash: have: command not found
-bash: have: command not found
-bash: have: command not found
-bash: have: command not found
-bash: have: command not found
-bash: have: command not found
-bash: have: command not found
-bash: have: command not found
-bash: have: command not found
-bash: have: command not found
-bash: [: =: unary operator expected
# ...
```

It goes on for quite some time and does not give me bash completion.

When I execute `source "$(brew --prefix)/etc/bash_completion"` it works and I get bash completion.

This script also emits a helpful error message letting people know if bash completion was not installed already.

I'll also add that the bash completion script takes a fairly long amount of time. I've seen between one quarter and a half of a second to execute it:

```
$ time source "$(brew --prefix)/etc/bash_completion"

real	0m0.254s
```

Though that's unrelated to this PR, making a note of it.
2018-12-06 12:04:08 -06:00
EricFromCanada
31dbc4f985 Various documentation edits
Mostly edits to formatting, grammar, wording for consistency & readability.
2018-10-05 17:23:22 -04:00
Mike McQuaid
c1376f9f18
docs: various updates.
I read through the docs locally and made various fixes.
2018-09-06 15:07:00 +01:00
Andrew Janke
36e961ad98 Doco: add a Shell Completion doc
This describes how to configure your shell to use Homebrew-managed completion
definitions. Needed because this is a manual step the user has to do.
2018-05-22 08:11:31 -04:00