Commit Graph

2094 Commits

Author SHA1 Message Date
Dan Davison
329ab6376e Delete unused Makefile target 2024-09-06 19:30:08 -04:00
Tau Gärtli
ba0bfaf9ec
Fix clippy warnings (#1851)
* Fix non-portable doc comments warning

A line starting with > might be interpreted as a block quote.
In regular markdown this could be prevented by escaping the `>`
using a backslash. However, since the doc comments are used by
clap for the long help more or less verbatim, the `\` would be visible
hence the shuffling around of words.

* Use `.contains()`
2024-09-06 08:39:52 -04:00
Thomas Otto
2d1cb201ab Handle quoted file paths in hunk headers
When core.quotepath is true (the default) then non-ASCII chars
in a file name are quoted. These quotes hide the DIFF_PREFIXES and
"a/1" "b/1" remains as such, instead of becoming "1" "1".

This was interpreted by delta as renamed file. Now these quotes are
removed before the DIFF_PREFIXES are searched.
2024-09-02 23:26:56 +02:00
Justin Su
218af1617f
Fix Catppuccin Latte name in LIGHT_SYNTAX_THEMES list (#1823) 2024-08-24 14:30:28 -04:00
Dan Davison
85cbe7e9c1
Move AmbiguousDiffMinusCounter to hunk_header (#1825) 2024-08-24 08:46:33 -04:00
Dan Davison
b590c0350f Bump version in download links 2024-08-24 08:42:31 -04:00
Dan Davison
1482d5886c Bump version 2024-08-24 08:39:06 -04:00
Dan Davison
4500605bca
Don't use a pager for --version (#1824) 2024-08-24 08:36:10 -04:00
Sarp User
6fbe197f2d
Added platypus theme (#1819)
* Added platypus theme
2024-08-21 21:04:02 -04:00
Dan Davison
1faea3952e Evolve python hyperlink server example 2024-08-20 11:10:14 -04:00
Dan Davison
95457d30c9 Evolve python hyperlink server example 2024-08-20 11:08:46 -04:00
Dan Davison
9889aedebd Fix typo in manual 2024-08-20 10:45:35 -04:00
Dan Davison
6361af9e10 Tweak hyperlinks manual page 2024-08-20 10:41:51 -04:00
Dan Davison
3593c944b1 Clean up Python server example... 2024-08-20 10:37:14 -04:00
Dan Davison
d8fa93eded Tweak hyperlinks manual page 2024-08-20 10:34:38 -04:00
Dan Davison
07f12c7cd1 Tweak Python server example 2024-08-20 10:33:09 -04:00
Dan Davison
977767a6c8
Add hyperlinks section to manual (#1816) 2024-08-20 10:23:02 -04:00
Dan Davison
cecb12c653 Add hyperlinks to github handles 2024-08-16 09:19:54 -04:00
Dan Davison
0c8822e390 Add maintainers section with @th1000s to README 2024-08-16 09:13:04 -04:00
Dan Davison
84daf812dd Update URLs for binaries 2024-08-16 09:10:15 -04:00
Dan Davison
9ebe4b8158 Delete now-unused pricate homebrew formula step from Makefile (II) 2024-08-16 09:09:55 -04:00
Dan Davison
3f9805274d Update --help in manual 2024-08-16 09:08:13 -04:00
Dan Davison
66b7a9e89e Delete now-unused pricate homebrew formula step from Makefile 2024-08-16 09:06:56 -04:00
Dan Davison
b9ca4eb3f0 Evolve release Makefile 2024-08-16 08:39:37 -04:00
Dan Davison
253487bbc1 Bump version 2024-08-16 08:36:01 -04:00
Thomas Otto
1f6cc72158 cd: build binaries targeting GNU libc on ubuntu-20.04, not latest
This improves compatibility, as latest is 24.04 currently. The statically
linked musl build still uses ubuntu-latest
2024-08-16 08:31:06 -04:00
Thomas Otto
08ec386f25 Handle ambiguous diff header, '--- ' can also be present in a minus hunk
`diff -u file1 file2` output starts with '--- file1', a '-- 12' line
being removed results in '--- 12', which was interpreted as the start of
a new diff. Now the number of removed lines announced in the header as e.g.
'@@ -1,4 +1,3 @@' is taken into account for this specific diff input.
2024-08-15 07:02:13 -04:00
Dan Davison
5c53c5e3d9
Support passing arguments to git diff and diff (#1697)
Adds --diff-args with short form -@.
2024-08-15 06:42:41 -04:00
Thomas Otto
a01141b720 Do not wrap short help (-h) output 2024-08-12 19:19:22 -04:00
Dan Davison
2c8292fee8 Fix delta-toggle shell script 2024-08-09 07:02:12 -04:00
Thomas Otto
0712274996 Cargo toml dependencies all in one block, sorted 2024-08-01 21:40:55 -04:00
Thomas Otto
f441d4d083 Fix build for rust 1.80
Upgrade "time" (and its dependency chain rooted at "plist"), the previous
version did not build with 1.80.

Tell the new 'unexpected_cfgs' lint that 'tarpaulin_include' is okay

Mark one clippy lint as a false positive
2024-08-01 21:40:55 -04:00
Thomas Otto
e0274867cd Use angle bracket around <urls>, regenerate help output markdown 2024-08-01 21:40:55 -04:00
Thomas Otto
d2765a489e Wrap --help output and use pager
Tell clap to not wrap output, append `after_long_help()` (with matching
ansi codes in this section), then manually wrap the result.

The help output is now paginated if writing to a terminal.

All code paths flow back to main(), so an invoked pager is properly
waited for (by the OutputType drop impl).
2024-08-01 21:40:55 -04:00
Thomas Otto
6ef193250a Add wrap function for --help output
Unicode and somewhat ANSI aware, can add indentation (skippable) and
can also skip wrapping lines by using configurable magic prefixes.
2024-08-01 21:40:55 -04:00
Thomas Otto
546e0ed412 Make drop impl of OutputType more prominent 2024-08-01 21:40:55 -04:00
Thomas Otto
c5f7428edd OutputType: PagerCfg and oneshot_write
Use new, smaller PagerCfg instead of the full Config, as for
pager output only 3 variables are relevant.

oneshot_write() can be used to write paginated output, usually
before exiting.
2024-08-01 21:40:55 -04:00
Rui Chen
587fe8f078 chore: cleanup brew formula file in favor of core tap
Signed-off-by: Rui Chen <rui@chenrui.dev>
2024-07-28 10:37:03 -04:00
Thomas Otto
21695da83a Add --max-syntax-highlighting-length, set to 400
--max-line-length increased to 3000, highlighting now stops after 400
characters. In that case the highlighting may be incorrect until it
is reset for the next hunk.
2024-07-22 02:54:31 +01:00
Thomas Otto
6205118b85 Add truncate_str_short() which always returns a prefix of the input
Document that the input of `truncate_str()` may be cut on a double width
char ("fullwidth") - then the output is no longer a prefix of the input.

`truncate_str_short()` could be faster by not constructing the result and
instead only returning an index, but it will be used in rare edge cases so
reusing existing logic is good enough.

Common code moved to `truncate_str_impl()`.

Assume (with fallback) that graphemes are at most 2 wide.
Fewer allocations.
Tests.
2024-07-22 02:54:31 +01:00
Tau Gärtli
841d559a84
Disable light mode detection in tests (#1765) 2024-07-21 20:41:23 -04:00
Tim Hill
95b2689d4a
Update syntect to 5.2.0 (#1672) 2024-07-17 10:23:46 -04:00
Justin Su
26d764a209
Fix copy-paste typo (#1767)
Accidentally introduced in #1744
2024-07-17 09:33:26 -04:00
Justin Su
07e951db22
Add missing --file-*-label option to --navigate docs (#1744)
Also sort the options alphabetically
2024-07-17 05:28:53 -04:00
wangweijie
c1e8e7b163
deps: bump libc from 0.2.153 to 0.2.155 (#1715)
Signed-off-by: wangweijie <wangweijie@loongson.cn>
2024-07-17 05:22:02 -04:00
Justin Su
f2c43ae0f3
Fix a typo to make Catppuccin Latte detected as light theme (#1745)
Also sort `LIGHT_SYNTAX_THEMES`
2024-07-17 05:18:00 -04:00
Thomas Otto
048ae76aaa Make less version >= 633 behave like previous versions wrt. Nerd Fonts
Sets `LESSUTFCHARDEF` (unless already present), a new env var introduced
by this less version to always print characters from the Private Use Area
of Unicode as-is, even if the terminal does not understand them.
2024-07-17 10:13:59 +01:00
Tau Gärtli
c4803e6825
Update terminal-colorsaurus (#1699)
* Update terminal-colorsaurus to 0.4.0

* Update `terminal-colorsaurus` with bugfix

> * 🐛 Fixed `OSC 11` response being visible to users of GNU Screen
     by detecting Screen and erroring before sending any control sequences (bash/terminal-colorsaurus#16).

* Update `terminal-colorsaurus` to 0.4.3
2024-07-16 13:39:59 -04:00
Edwin Hermans
4127abc807
Fix github links from master to main (#1709)
* Fix github master to main URLs

The commit history of `master` is now empty, so only the PR list link fails (and didn't get rendered as link before anyway).
I'm fixing all the links I could find with a cursory search just to clean things up.

* Update how-delta-works.md master to main

* Update color-moved-support.md master to main

* Update ARCHITECTURE.md master to main
2024-07-12 08:04:06 +01:00
Thomas Otto
5d538b2303 Make relative-paths work with binary files
`relativize_path_maybe()` was not called in this case. Added
test and converted a few existing ones to insta.
2024-07-09 00:00:18 +01:00