This concerns builtins writing to an io_buffer_t. io_buffer_t is how fish
captures output, especially in command substitutions:
set STUFF (string upper stuff)
Recall that io_buffer_t fills itself by reading from an fd (typically
connected to stdout of the command). However if our command is a builtin,
then we can write to the buffer directly.
Prior to this change, when a builtin anticipated writing to an
io_buffer_t, it would first write into an internal buffer, and then after
the builtin was finished, we would copy it to the io_buffer_t. This was
because we didn't have a polymorphic receiver for builtin output: we
always buffered it and then directed it to the io_buffer_t or file
descriptor or stdout or whatever.
Now that we have polymorphpic io_streams_t, we can notice ahead of time
that the builtin output is destined for an internal buffer and have it
just write directly to that buffer. This saves a buffering step, which is
a nice simplification.
Some third party Git tools provide a man page, which we can at least use
for completing options.
The old logic excluded all generated completions for Git subcommands.
Instead, try to load completions for all available external subcommands.
We can use $PATH/git-* because /bin/git-add and friends were removed in Git
1.6.0 in 2008.
Closes#4358 (the "git-foo" wrapping was added in #7652)
This performs *most* of the pcreectomy of b418e36f22.
It removes the tests and docs and all the large files, but it does
*not* touch any of the files except for making Find_Package
quiet (783a895b11) or remove the AUTHORS and similar files as
they are very small.
This seems much easier, cleaner, nicer and has 90% of the effect of
the old - the size now is 2.7MB instead of 2.1MB, down from 10MB.
Fixes#7599
While the user waits at the prompt, fish is waiting in select(), on stdin.
The sigio based universal notifier interrupts select() by arranging for a
signal to be delivered, which causes select() to return with EINTR.
However we weren't polling the notifier at that point so we would not
notice uvar changes, until we got some real input.
I didn't notice this when testing, because my testing was changing fish
prompt colors which updated the prompt for other reasons.
Fixes#7671.
As spotted in #7656, macOS installer files built on Big Sur fail signature
verification on macOS 10.11. This is because Big Sur productsign no longer
supplies the SHA-1 hash, and 10.11 does not know how to read the SHA-256
hash.
Replace the productsign flow with a flow based on
http://users.wfu.edu/cottrell/productsign/productsign_linux.html . This
uses the xar tool to digitally sign the installer packages, with both
SHA-1 and SHA-256 hashes.
The xar tool is somewhat tricky to build, so is checked in (as binary!)
compiled for Mac.
To build a Mac package, run make_pkg.sh (which invokes the signing flow)
followed by mac_notarize.sh which adds the notarization.
E.g. autoloading and aliases are both about functions, variable scope
and overrides are both about variables.
It makes sense to group these together, and this might allow us to
collapse some of the TOC later.
Also move abbr explanation to interactive use (as abbrs are purely an
interactive concept)
(also add an example to tilde expansion, not making a separate commit
for that)
This was only a thing in cygwin, and only a workaround because
cygwin's hostname was broken in 2013 and our sample prompts called it,
which caused errors in fish_config.
Our sample prompts no longer call `hostname` at all (they use
`prompt_hostname`, which uses the variable), and it's possible
cygwin's hostname was fixed in the meantime.
Fixes#7669.
Now that we have multiple clients of count_preceding_backslashes, factor
it out from fish_indent into wcstringutil.h, and then use the shared
implementation.
* completions/userdbctl: init
userdbctl:
Show user and group information.
A part of systemd.
* completions/userdbctl: fix complete services
Complete the services at the completion time.
This goes to a separate file because that makes option parsing easier
and allows profiling both at the same time.
The "normal" profile now contains only the profile data of the actual
run, which is much more useful - you can now profile a function by
running
fish -C 'source /path/to/thing' --profile /tmp/thefunction.prof -c 'thefunction'
and won't need to filter out extraneous information.
Expansion parses slices like "$PATH[1..2]", but so does "set" when assigning
"set PATH[1..2] . .". Commit be06f842a ("Allow to omit indices in index
range expansions") forgot the latter.
This allows us to flex them together, so now you get one column on the
left with the title "Documents" and one on the right saying
"Sections" on narrow screens.
On wide screens it doesn't say "Table Of Contents" twice.
This should make it clearer
This used to put the TOC last, which is the last place you'd want it.
It's not perfect and we do some hacky layoutery to achieve it, but it
should generally be usable.
This makes the *tables* themselves scrollable, not the section div
they are in, which means the section doesn't scroll along with
them (it's already reflowed).
We were soucing it manually, and implicitly via the `complete -C "git-foo "`
wrapper. Always use the latter, so fish knows that the completion is already
loaded.
This had a classic float:left layout, which led to awkward gaps and
stuff.
Since what we want here is basically 100% exactly a flexbox, just use that.
Note: No flexbox for the prompts, atm, because having multiple of
those next to each other looks a bit weird.