Commit graph

15187 commits

Author SHA1 Message Date
Spenser Black
2fcea496a9 Complete only filenames after git show -- 2022-01-26 18:43:57 +01:00
David Adam
640feeee67 CHANGELOG: work on 3.4.0 2022-01-23 22:45:09 +08:00
EmilySeville7cfg
36699d49d8 Specify program versions 2022-01-23 21:52:17 +08:00
EmilySeville7cfg
f881f70992 Completion for matlab command 2022-01-23 21:52:17 +08:00
EmilySeville7cfg
ec870fff93 Completion for octave command 2022-01-23 21:52:17 +08:00
exploide
229e315fc5 tar completion: added useful options 2022-01-23 14:33:07 +01:00
Aaron Gyes
275601665f Shorten more commands
We're at 2 columns @ 115-wide terminal.
2022-01-22 21:21:21 -08:00
Aaron Gyes
81c46183fd breakpoint: shorter 2022-01-22 21:18:24 -08:00
Aaron Gyes
b1deb8af89 down-or-search: shorten description 2022-01-22 21:12:01 -08:00
Aaron Gyes
1262469aea Shorten two more command's descriptions
Two columns at 119 width.
2022-01-22 21:04:26 -08:00
Aaron Gyes
ed0b6cdc9d Shorten fish_sigtrap_handler description.
We can now get two columuns in the pager hitting <TAB> at 124 cols
2022-01-22 20:57:48 -08:00
Aaron Gyes
cd47411bbb Shorten breakpoint description 2022-01-22 20:52:29 -08:00
Aaron Gyes
a617ef7ec1 Fix typo in preinstall script. 2022-01-22 20:08:32 -08:00
Aaron Gyes
fe9822bb20 Fix welcome text, don't use logger.
Logger was unneccessary - stderr was being captured.

Do the welcome message as HTML - it's easier. Fixes #8661
2022-01-22 20:06:37 -08:00
Aaron Gyes
4a6dbe0922 prompt_* functions: shorten their descriptions 2022-01-22 20:06:37 -08:00
Jeff Dickey
af11a628f9 git diff --quiet has no "-q" flag
https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---quiet
2022-01-22 13:17:11 +08:00
Dundar Göc
fe21cb44c9 entr 2022-01-21 18:11:48 -08:00
Dundar Göc
e8af17c191 lpadmin 2022-01-21 18:11:48 -08:00
Dundar Göc
864f5ca254 lpstat 2022-01-21 18:11:48 -08:00
Dundar Göc
954de44414 mocp 2022-01-21 18:11:48 -08:00
Dundar Göc
f45ca4aca4 completions(postgresql): shorten descriptions 2022-01-21 18:11:48 -08:00
Dundar Göc
cd52937771 completions(sass): shorten descriptions 2022-01-21 18:11:48 -08:00
Dundar Göc
48e686dae2 completions(latexmk): shorten descriptions 2022-01-21 18:11:48 -08:00
Dundar Göc
095aed64e0 completions(imagemagick): shorten descriptions 2022-01-21 18:11:48 -08:00
Dundar Göc
7667a51d93 completions(cdrecord): shorten descriptions 2022-01-21 18:11:48 -08:00
Dundar Göc
3bad45a933 completions(bison): shorten descriptions
Work on https://github.com/fish-shell/fish-shell/issues/6981
2022-01-21 18:11:48 -08:00
Aaron Gyes
9c1723863d
Update CHANGELOG.rst 2022-01-21 14:28:49 -08:00
Aaron Gyes
0d5651b0ab .pkg scripts: remove old installs, fix install volume, logging
+ Adds a preinstall script to wipe out whatever the last .pkg
   installed. This should avoid systems that have mad many updates
   getting into strange states autoloading things that no longer
   exist. Fixes #2963

 + Run add-shell with ${DSTVOLUME} prepended to the path - the
   installer lets users intall onto any volume, so it's plausible
   not installed onto /

 + Use `logger` instead of rando /tmp files for logging - stuff
   should show up in Console.

 + make_pkg makes the pkg and also fish.app - the former was being
   built with -j12 already, make the latter do so as well.
2022-01-21 14:01:06 -08:00
Fabian Homborg
f40c054a6a Replace hangul hack with widecharwidth version
This updates widecharwidth to
6d3d55b419db93934517cb568d1a3d95909b4c7b, which includes the same
Hangul Jamo check in a separate table.

This should slightly speed up most width calculation because we no
longer need to do it for most chars, including the overwhelmingly
common ascii ones.

Also the range is increased and should better match reality.
2022-01-21 17:10:52 +01:00
Mahmoud Al-Qudsi
372f03ba20 Fix sys/sysctl.h depreciation error under glibc 2.30+
glibc 2.30 and up emit an ugly depreciation warning on
`#include <sys/sysctl.h>` - this patch makes the build system fail the
include test for `sys/sysctl.h` by forcibly setting `-Werror` before the
call to `check_include_files` (which internally uses `try_compile`) to
get `HAVE_SYS_SYSCTL` to not be defined (even if it's there) if it would
cause such a depreciation message to be emitted.

Ideally, we would not have to manually massage `CMAKE_C_FLAGS` before
calling `check_include_files` and could just tweak that to either always
or conditionally try compilation with `-Werror`, but try_compile doesn't
actually use any overridden `CMAKE_C_FLAGS` values [0] (dating back to
2006).

[0]: https://cmake.org/pipermail/cmake/2006-October/011649.html
2022-01-20 11:04:40 -06:00
Fabian Homborg
02241d19be CHANGELOG More ignores 2022-01-20 17:15:34 +01:00
Fabian Homborg
b74f610a47 completions/gcc: Some small fixes
Remove some nonexistent options (my gcc does not know "-mdata"), fix
the longest description in all of fish and remove some argument
markers from the option.
2022-01-20 17:14:38 +01:00
Dundar Göc
157d8cfd74 completions(ant): shorten descriptions 2022-01-20 10:49:40 +01:00
Dundar Göc
8878e990a4 completion(ansible-playbook, ansible): shorten descriptions 2022-01-20 10:48:41 +01:00
Dundar Göc
87ce317716 completion(animate): shorten descriptions 2022-01-20 10:48:08 +01:00
Aaron Gyes
401d302179 :Revert "Remove CheckIncludeFiles.cmake"
This reverts commit 398f3213d2.
2022-01-19 11:41:16 -08:00
Aaron Gyes
398f3213d2 Remove CheckIncludeFiles.cmake
We apparently vendored it for the sake of attempting to support
old cmake versions:
7aefaff298.
"This file can be dropped once the minimum version of CMake for fish is 3.11.0"

So, drop it like it's hot.
2022-01-19 11:38:41 -08:00
Fabian Homborg
9d59254a72 themes: Resolve pager_selected_background
This sets the variable to the background value of
$fish_color_search_match, which fixes the case where you switch from a
theme with a set selected background (like our default, now) to one without.
2022-01-19 17:54:59 +01:00
Fabian Homborg
24f9fdd0a7 themes/default: Set pager selection to reverse
This makes it look okay on both light and dark backgrounds.
2022-01-19 17:23:42 +01:00
Johannes Altmanninger
2a98b7a593 docs synopsis: make all placeholder arguments uppercase
man(1) uses lowercase placeholders but we usually don't.  Additionally,
the new synopsis autoformatting only recognizes placeholders if they
are uppercase. Use uppercase for all placeholders.
2022-01-19 22:56:41 +08:00
Johannes Altmanninger
c0d1e41313 docs synopsis: add HTML highlighing and automate manpage markup
Recent synopsis changes move from literal code blocks to
[RST line blocks].  This does not translate well to HTML: it's not
rendered in monospace, so aligment is lost.  Additionally, we don't
get syntax highlighting in HTML, which adds differences to our code
samples which are highlighted.

We hard-wrap synopsis lines (like code blocks). To align continuation
lines in manpages we need [backslashes in weird places]. Combined with
the **, *, and `` markup, it's a bit hard to get the alignment right.

Fix these by moving synopsis sources back to code blocks and compute
HTML syntax highlighting and manpage markup with a custom Sphinx
extension.

The new Pygments lexer can tokenize a synopsis and assign the various
highlighting roles, which closely matches fish's syntax highlighing:
- command/keyword (dark blue)
- parameter (light blue)
- operator like and/or/not/&&/|| (cyan)
- grammar metacharacter (black)

For manpage output, we don't project the fish syntax highlighting
but follow the markup convention in GNU's man(1):

	bold text          type exactly as shown.
	italic text        replace with appropriate argument.

To make it easy to separate these two automatically, formalize that
(italic) placeholders must be uppercase; while all lowercase text is
interpreted literally (so rendered bold).
This makes manpages more consistent, see string-join(1) and and(1).

Implementation notes:
Since we want manpage formatting but Sphinx's Pygments highlighing
plugin does not support manpage output, add our custom "synopsis"
directive.  This directive parses differently when manpage output is
specified. This means that the HTML and manpage build processes must
not share a cache, because the parsed doctrees are cached.  Work around
this by using separate cache locations for build targets "sphinx-docs"
(which creates HTML) and "sphinx-manpages".  A better solution would
be to only override Sphinx's ManualPageBuilder but that would take a
bit more code (ideally we could override ManualPageWriter but Sphinx
4.3.2 doesn't really support that).

---

Alternative solution: stick with line blocks but use roles like
:command: or :option: (or custom ones). While this would make it
possible to produce HTML that is consistent with code blocks (by adding
a bit of CSS), the source would look uglier and is harder to maintain.
(Let's say we want to add custom formatting to the [|] metacharacters
in HTML.  This is much easier with the proposed patch.)

---

[RST line blocks]: https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#line-blocks
[backslashes in weird places]: https://github.com/fish-shell/fish-shell/pull/8626#discussion_r782837750
2022-01-19 22:56:41 +08:00
Johannes Altmanninger
1c21e26d08 docs: load custom lexer with plain Python import
The next commit will load another of our Python extensions from a
separate file. That extension will contain more than just a Pygments
lexer, so instead of using a function that can only load a lexer,
just import from the module to keep things consistent.
2022-01-19 22:56:41 +08:00
Fabian Homborg
89e85e05e0 completions/git: Add add --chmod option
Fixes #8652.
2022-01-18 19:20:27 +01:00
Fabian Homborg
f612ade5d9 CHANGELOG for 3.4.0 2022-01-18 18:09:29 +01:00
Pablo Santiago Blum de Aguiar
6315cf67ec Assert and and or create no new scope 2022-01-18 17:56:33 +01:00
David Adam
a22779e807 CHANGELOG: work on 3.4.0 2022-01-18 23:34:50 +08:00
Dundar Göc
48652eebc1 completion: add completions for topgrade 2022-01-18 23:33:52 +08:00
dundargoc
9b3783d54a
completions: shorten descriptions for p4 (#8647)
Work towards #6981
2022-01-17 11:06:05 -08:00
Fabian Homborg
0127b237e7 completions/git: Complete heads for push
Fixes #8650
2022-01-17 17:49:00 +01:00
Jakub Panek
d5076572c8 completions(apk.fish): force file/parameter completion
Signed-off-by: Jakub Panek <me@panekj.dev>
2022-01-17 06:48:54 +01:00