This made the current prompt appear directly under the tab,
disregarding the padding.
That means it looked inconsistent with the colors. (note there's still
less padding on the side, but at least that allows more actual content
- prompts are often fairly wide)
This has one slight behavioral change: Even with xsel, it now copies
to the clipboard, not the primary. I would imagine anyone who cares
about the primary selection has customized fish_clipboard_copy and
because we never got a bug about this not supporting anything but
xsel (and errorring out if it's not available!) this is probably
unused.
So now we support all the clipboard integration things, and we use the clipboard.
This change adds a binding that sets the s key's behaviour to match
the c key's in visual mode. This mirrors vim's behaviour (see `:h v_s`
in vim or neovim).
Apart from OpenBSD's "colorls" that is basically an ls that can do
color, there's also a ruby tool called "colorls" that's closer to exa.
Ignore that one since the options it understands are quite different
and I'm betting it's slower (given my experience with ruby tools).
See #8042.
* add support for colorized ls on openbsd
* add changelog line for colorls support
* add readme line for colorls support
* determine ls command at runtime, don't cache it
* eliminate __fish_ls_command function
Stop using "--no-init"/"-X" because we have no actual reason to and it
may break mouse initialization on my best friend macOS.
Use --RAW-CONTROL-CHARS, the capital version that only lets through
specific escape sequences, not *everything* - we shouldn't have
anything weird here, but less heavily discourages the other version.
Allow a user's $LESS to override.
Fixes#7997.
In such cases, `pacmd help` prints
No PulseAudio daemon running, or not running as session daemon.
to stderr, which ends up printed to the user terminal.
This isn't really a "locale" variable as such. It has no effect on
encoding and stuff, it's just the output language.
What we really want here is get something better than the awkward "C"
or "POSIX" for LC_CTYPE specifically - everything else doesn't really
matter.
Recently Safari seems to hang with fish webconfig. This is apparently
because Safari is opening a socket and not writing to it, causing
webconfig to hang until the timeout (30 seconds). It's not clear why.
Use ThreadingMixIn so that FishConfigTCPServer can handle more
than one connection at a time. This fixes the hang under Safari.
From my checks (gnome-terminal with the "gnome light" colorscheme)
this seems to be the only color that's barely visible in a light
terminal, and it's the only color mentioned in both bug reports.
I'm leaving the artistic decisions to others, this is now *acceptable*
in both.
Note that, because we use universal variables here (hint #7317), this
will only be changed for preexisting installations when the user
reloads the colorscheme.
Fixes#3412Fixes#3893
It's a bit weird to *have* to fire up a browser to get fish_config to
choose a prompt.
So this adds a `prompt` subcommand to `fish_config`:
- `fish_config prompt list` shows all the available prompt names
- `fish_config prompt show` demos the available sample prompts
- `fish_config prompt choose` sources a prompt
- `fish_config prompt save` makes the choice permanent
A bare `fish_config` or `fish_config browse` opens the web UI.
Part of #3625.
TODO: This shows the right prompt on a new line. Showing it in-line is awkward
to do because we'd have to move it to the right.
Because MacOS' apropos is bad and doesn't support the `--` option
separator, this apparently spews errors.
Because the argument _can't_ start with a `-` (because we add a `^`),
we can just remove it.
Fixes#7965.
This prints a description of the "host". Currently that's
`(chroot:debianchroot) $USER@$hostname`
with the chroot part when needed.
This also switches the default and terlar prompts to use it, the other
prompts have slightly different coloring or logic here.
These were hard to read in the browser, but not in the terminal.
The palette in color.cpp lists #000080 for blue, which is *even darker*. I'm not sure if that's actually a thing - I was under the impression that table was taken from xterm.
Either way, listing it in this color doesn't do anyone any favors. It's just a rough approximation anyway.
Otherwise this has filesystem order, which on my system is quite
chaotic.
An alternative would be to randomize the order so people see different
prompts each time.
Some features:
- A nice `►` prompt char with a fallback for non-utf8 systems
- The $PWD is colored depending on its sha, so different directories
are colored differently, but each directory stays the same
- User@Host is only shown if not on the local machine (ssh or
virtualization)
- A right prompt with a nice git display, date, duration of the last
command (if it took over 100ms), and virtualenv
This gets fish to print the right prompt of any sample if it has any,
and then shows it separately.
If there is a right prompt, it will also save it. If not, it will *not* overwrite an existing right prompt.
This called `uname` just to check if we *should* shorten "cygdrive"
directories.
That's more annoying than just doing it by default - on my system `pwd
| string replace` takes about 100 *micro*seconds, and this is done
once per prompt. Anyway, using $PWD further speeds it up to ~30
microseconds (compared to 10-20 for just `pwd`). This is hard to
measure because it's heavily impacted by system hitter.
The alternative is to ask cygwin to ship this feature as a patch.
Complete RPM files instead of pacakges if there is either
1. a slash in the token, which precludes package names
2. no matching package
To enable 2, pass the commandline token to the dnf query, instead of
an undefined variable. This allows SQL injection; not sure if we care.
We could always complete RPM files but maybe that's too noisy.
Also, isn't that what the "rpm" command is for?
Closes#7928
Fixes#7926.
Also switches the default status order for non-informative to the informative one:
stagedstate invalidstate dirtystate untrackedfiles stashstate
instead of
dirty staged stash untracked
This should be a simple prompt that doesn't place a huge strain on the
system but communicates the most important information simply and
effectively.
It should be a good jumping off point for making your own prompt.
Unless that person directly contributed the prompt.
We name them after a feature - the Scales prompt feature a ">>>" which
kinda looks like fish scales, the "Arrow" prompt starts with a
prominent "➜".
Naming them after people looks like an endorsement of that particular
person, and like they are someone to look up to, especially when they
aren't involved with the project.
The "terlar" and "acidhub" prompts stay for now because they
contributed the prompt themselves, they are also much less prominent.
The "classic" prompts are all just variations on a theme, let's just
keep the default classic+vcs.
"Justadollar" is very unlikely to be what you want and also trivial to
write yourself.
I have no idea what screen_savvy even is for - it reacts to "$WINDOW",
but I don't know anything that even uses that variable.
Lonetwin is just unremarkable, and the debian chroot prompt has one special feature that should be integrated into the other prompts.
Because macOS' `apropos` is just using grep, and we only need
a prefix match for __fish_describe_command, we can shave off
some ok total execution time here.
No longer uses the __fish_apropos hack on every version of macOS.
Juat Catalina+.
The whatis database generated and replaced daily is 2 megabytes on
my computer, and in ~/.cache on a home dir might wind up on a net
mount or something annoying. or, definitely it's backed up by default.
It's wiser to throw that junk in with other cache files on the system
aka DARWIN_USER_CACHE_DIR, and only use the XDG directory if
someone specifically configured that.
Mainly, this just means at least it won't automatically get backed
up by Time Machine and stuff every day, which is no big deal but
y'know...
Rearranged stuff a little to not shell out every time.
The default vi mode prompt is kind of ugly, mostly because we include
this `[I]` with a super bright green background and white text,
which is particularly grating because most prompts don't actually have
a background.
So we get a ton of people asking "How do I remove this [I]" when they
could really benefit from having the mode shown.
There's a few ways to make this look nicer, the simplest is to just
keep the same colors but use them as foreground instead of background
colors, which looks much more understated.
The mode prompt is important, but not more than the actual contents of
the commandline, so it shouldn't have ALARMING colors.
This allows us to stop descending into untracked directories, which
can be faster.
It's still not *good* - git can still be quite slow here, but if
there's an untracked directory you probably don't care about the
number of files in that.
Fixes#7871.
This is all of the sections in interactive, language and for_bash_users.
The faq names are so long that we're not adding them, also not all of
these have descriptions yet.
Given that we no longer have that massive "index" page with
everything, it's become harder to open the correct section
immediately.
So this hardcodes the section titles for each page in help itself.
This was half-automated with
grep -o 'a class="headerlink" href="#[^"]*"' /usr/share/doc/fish/faq.html | sort -u | string replace -r '.*#' '' | string trim -c '"'
The completions still need to be adjusted.
In vim p means paste *after* current character, so go forward a char before pasting.
Also in vim, P means paste *at* current position (like at '|' with cursor = line),
so there's no need to go back a char, just paste it without moving.
Prior to this commit "builtin -h" would silently fail when no
documentation is installed. This happens when running fish without
installing it, or when the docs are not installed.
See #7824
After a fish installation is upgraded to 3.2.0, active shells could
throw an error attempting to load Git completions. It's just a
transient error but also easily avoidable by using the old style.
See #7822