This introduces two functions to
- toggle a process prefix, used for adding "sudo"
- add a job suffix, used for adding "&| less"
Not sure if they are very useful; we'll see.
Closes#7905
I almost always use this on the last/only job in a commandline, so
the semicolon is usually not needed. We have always added it but I
prefer not dropping it: this feels cleaner because it's what you'd
type without the shortcut.
Similarly to b0e3cc4b5 (__fish_complete_suffix: Remove `eval`,
2019-12-28), this use of eval is unsafe and can spew errors if
invoked on an incomplete brace expansion.
Commit d15a51897 ("Rationalize $LESS uses") switched a "less" flag
from -r (interpret all control characters)
to -R (interpret only color codes)
Somehow this changed the output of "fish -c 'command -h'" to include
weird characters:
DESCRIPTION^O
command^O forces the shell to execute the program COMMANDNAME^O and ignore any functions or builtins with the same name.
Probably this was the reason why I originally used -r over -R. Anyway,
-R is safer and it looks like we can just remove the "ul" preprocessing
since "less" will interpret bold/underline just fine.
The `__fish_git_unique_remote_branches` function isn't applicable here
since `git describe` won't know what to do with a remote branch without
the remote prefix. For example, if there is a branch called
`origin/my-branch`, you can't execute `git describe my-branch` until the
branch is checked out locally. In other words:
Good: `git describe origin/my-branch`
Bad: `git describe my-branch`
Good: `git switch my-branch; git describe my-branch`
The completions for the `--example` option are generated using `find`.
The `find` utility on macOS will produce the following output when the
path argument has a trailing slash:
```
~/bat $ find ./examples/
./examples/
./examples//cat.rs
./examples//advanced.rs
./examples//simple.rs
./examples//list_syntaxes_and_themes.rs
./examples//yaml.rs
```
And will produce this output if the path does NOT have a trailing slash:
```
~/bat $ find ./examples
./examples
./examples/cat.rs
./examples/advanced.rs
./examples/simple.rs
./examples/list_syntaxes_and_themes.rs
./examples/yaml.rs
```
The extra slash after `examples` ends up in the completion suggestions
which is incorrect:
```
~/bat $ cargo run --example <TAB>
/advanced /cat /list_syntaxes_and_themes /simple /yaml
```
Unlike on my Linux box where `find` doesn't output the trailing slash:
```
~/bat $ cargo run --example <TAB>
advanced cat inputs list_syntaxes_and_themes simple yaml
```
Importantly, I get the same (correct) output on Linux even without the
trailing slash in the path argument to `find`.
This can give false positives but only if used on directories that
mix tracked and untracked files. The performance is better than
listing all tracked files, and in any case we're pretty far from a
correct solution that knows the target Git commit, so this seems like
good compromise.
The buttons were already supposed to highlight on hover, but the color
difference was barely visible. Crank that up.
Also add a hover color to the tabs, colorschemes, prompts, functions.
The big clickable things.
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