By default, fish does not complete files that have leading dots, unless the
wildcard itself has a leading dot. However this also affected completions;
for example `git add` would not offer `.gitlab-ci.yml` because it has a
leading dot.
Relax this for custom completions. Default file expansion still
suppresses leading dots, but now custom completions can create
leading-dot completions and they will be offered.
Fixes#3707.
(cherry picked from commit b7de768c73)
* completion(usbip): support ipv6
Signed-off-by: Next Alone <12210746+NextAlone@users.noreply.github.com>
* completion(usbip): use fish string match
Signed-off-by: Next Alone <12210746+NextAlone@users.noreply.github.com>
* fix: support --remote and -r both
Signed-off-by: Next Alone <12210746+NextAlone@users.noreply.github.com>
---------
Signed-off-by: Next Alone <12210746+NextAlone@users.noreply.github.com>
(cherry picked from commit 382005c33e)
This makes it easier to get *any pager* in the number of places we do.
Unfortunately:
1. It can't just execute the pager because that might block
2. We can't really set the necessary options for less here
so they still need to be set outside.
This
Fixes#10074
by falling back to `cat` in that case. We could also decide to abort
instead of using a non-pager, but for history that's probably fine.
(cherry picked from commit ed489d0d52)
After deleting a history item with
history delete --exact --case-sensitive the-item
it is still reachable by history search until the shell is restarted.
Let's fix this by saving history after each deletion. The non-exact variants
of "history delete" already do this. I think this was just an oversight
owed to the fact that hardly anyone uses "--exact" (else we would surely
have changed it to not require an explicit "--case-sensitive").
(cherry picked from commit 326e62515b)
Fixes#10066
Adhere as best as possible to the style guidelines at
https://www.nordtheme.com/docs/colors-and-palettes. Some adaptations were made
so that `functions <function>` is also syntax highlighted per the upstream
recommendations.
Additionally, the theme file has been reordered to follow the order of variables
defined in interactive syntax-highlighting-variables documentation.
(cherry picked from commit 48ef682cad)
This was an issue with "--no-execute", which has no variables and
therefore no $HOME:
```fish
fish --no-execute /path/to/file
```
would say the error is in `~/path/to/file`.
Instead, since this is just for a message, we simply return the
filename without doing the replacement.
Fixes#10171
Port of e318585021
This gives us the biggest chance that these are *visible* in the
terminal, which allows people to choose something nicer.
It changes two colors - the autosuggestion and the pager
description (i.e. the completion descriptions in the pager).
In a bunch of terminals I've tested these are pretty similar - for the
most part brblack for the suggestions is a bit brighter than 555, and
yellow for the descriptions is less blue
than the original.
We could also make the descriptions brblack, but that's for later.
Technically we are a bit naughty in having a few foreground and
background pairs that might not be visible,
but there's nothing we can do if someone makes white invisible on brblack.
Fixes#9913Fixes#3443
(cherry picked from commit ed881bcdd8)
This didn't work for something like `pactl set-card-profile foo
<TAB>`,
because it didn't allow for the card name, as it would just print the
index again and again.
(cherry picked from commit 5f26c56ed5)
* docs: Add "Writing your own prompt" doc
* Remove a space from the "output"
* some teensy adjustments
* Address feedback
* envvar one more PWD
* More html warning
(cherry picked from commit c385027eca)
This allows giving a range like "5..7".
It works in combination with more (including overlapping) ranges or
single indices.
Fixes#9736
(cherry picked from commit 65769bf8c8)
* Improve prompt execution time
* Change status to changes
* Remove grep/awk/sort
* Remove calls to grep/awk/sort
* Don't overwrite user defined colors
* Make look more consistent with git
(cherry picked from commit 43b1be0579)
This test wants to generate a U+FDD2 to see it is not mishandled.
To do so, we tried to use sh, which on my system is bash and can do
`$'\ufdd2'`.
Unfortunately on other systems it might be dash, which won't do that.
Since I don't know of a good no-dependency portable way to generate
this (I dimly remember python3 being a shim on some systems, so I do
not want to invoke it here), we'll just use our own printf.
Which is a worse test, we control both parts, but it'll do.
Fixes#10134