| Age | Commit message (Collapse) | Author |
|
|
|
* Support external subcommands: rg, git show, git log (etc.)
The possible command line now is:
delta <delta-args> [SUBCMD <subcmd-args>]
If the entire command line fails to parse because SUBCMD is unknown,
then try (until the next arg fails) parsing <delta-args> only,
and then parse and call SUBCMD.., its output is piped into delta.
Other subcommands also take precedence over the diff/git-diff mode
(`delta a b`, where e.g. a=git and b=show), and any diff call gets
converted into an external subcommand first.
Available are:
delta rg .. => rg --json .. | delta
delta a b .. => git diff a b .. | delta
delta git show .. => git <color-on> show .. | delta
and all other git-CMDS, of which
add -p, blame, checkout -p, diff, grep, log -p, reflog -p, and stash show -p
produce a diff.
Because --json is automatically added for `delta rg ..`, it avoids the
parsing ambiguities of and is easier to type than `rg .. | delta`.
The piping is not done by the shell, but delta, so the subcommands
are now child processes of delta.
* Set calling process directly because delta started it
This info then takes precedence over whatever
start_determining_calling_process_in_thread() finds or rather
doesn't find.
(The simple yet generous SeqCst is used on purpose for the atomic operations.)
|
|
Move blame to CallingProcess
Signed-off-by: dvermd <315743+dvermd@users.noreply.github.com>
|
|
Signed-off-by: dvermd <315743+dvermd@users.noreply.github.com>
|
|
|
|
* Fix clippy warnings
* Repair --default-language, and highlight using full filename
Fixed that the "txt" fallback was used instead of --default-language
And when looking for syntax highlighting, keep the filename around
as long as possible.
Using simple custom logic (filename > 4) a Makefile can be highlighted
with make syntax, but a 'cc' or 'ini' file does not get treated like
a *.cc or *.ini file.
Currently the underlying highlighting lib syntect and the sublime syntax
definitions can not make this distinction
(<http://www.sublimetext.com/docs/syntax.html>).
|
|
|
|
Corrects misspellings identified by https://github.com/marketplace/actions/check-spelling
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
|
|
* Fix clippy warnings
- `clippy::uninlined_format_args`
* Fix clippy warnings
- `clippy::clone_on_copy`
- `clippy::explicit_auto_deref`
- `clippy::iter_cloned_collect`
- `clippy::map_clone`
- `clippy::needless_borrow`
- `clippy::needless_lifetimes`
- `clippy::needless_return`
- `clippy::redundant_clone`
- `clippy::redundant_field_names`
- `clippy::seek_to_start_instead_of_rewind`
- `clippy::unnecessary_cast`
- `clippy::unused_unit`
|
|
|
|
Following fixes are included:
* derive_partial_eq_without_eq:
Eq trait was added by running `cargo clippy --fix --no-deps`.
* get_first:
Function was replaced by running `cargo clippy --fix --no-deps`.
* unnecessary_to_owned:
This check was disabled for ANSIString as to_string call is required
to enforce formatting. Otherwise the underlying string was returned
directly (probably due to Deref implementation).
* type_complexity:
Closure type was simplified and Box<> usage was removed.
|
|
Found via following command:
codespell -L crate,nin,numer,struc,ded,fo
|
|
The test_process_calling_cmdline test only allows "cargo test" and
"cargo tarpaulin" for running the testsuite, for "cargo t" is a
built-in alias for "cargo test" and should be allowed, too.
|
|
The env var DELTA_CALLING_PROCESS_QUERY_ALL re-enables this
last resort method. However usually this is just an expensive
scan which doesn't find the caller anyhow.
|
|
|
|
Fix file paths and hyperlinks
With this commit the target of a hyperlink should always be an absolute path. This should be true for all file hyperlinks, e.g.
- File hyperlink
- Hunk header hyperlink
- Line number hyperlink
Fixes #890
|
|
|
|
|
|
|
|
|
|
Ensures that no unrelated process is found when selectively
refreshing a pid range.
|
|
Start the query even before determining if information about the
parent process is required (which are most invocations anyhow).
|
|
|
|
This query only happens once, so caching is not needed
Also update sysinfo version to fix a crash related to this.
|
|
* Do not query CPU data when querying process data
Fixes #839
Ref https://github.com/GuillaumeGomez/sysinfo/issues/632
* Update branch of sysinfo
* Update upstream sysinfo commit
Ref https://github.com/GuillaumeGomez/sysinfo/pull/636
* Point sysinfo at an explicit commit rather than a symbolic branch name
commit d647acfbf216848a8237e1f9251b2c48860a547f
Merge: 989ac6c 67a586c
Author: Guillaume Gomez <guillaume1.gomez@gmail.com>
Date: 2 hours ago
Merge pull request #636 from GuillaumeGomez/update-if-needed
Only update processors if needed
|
|
This query now happens for more invocation types, so speed it up.
Call `refresh_process()` only on pids numerically close to the one
of delta itself.
|
|
See #824 in which some users are reporting very slow performance.
Fixes #824
|
|
Note that currently `cargo clippy --tests` is not checked by the CI runs
|
|
|
|
|
|
Fixes #440
Ref #152
|
|
|
|
|
|
|
|
Can fake once, for_scope, or with a given list.
|
|
Ref #794
|
|
|
|
- Handle standard filepath:code and filepath:line_number:code output
as produced by `git grep`, `rg -H`, `grep -H`, etc (with -n for line
numbers).
- Retain the match highlighting as produced by the grep tool, and
expose it in delta's color output styled with grep-match-style.
(Note that --color=always is needed to retain the color if piping
into delta, but not for `git grep` when delta is configured as git's
pager)
- Special handling of -p, and -W options of `git grep`: these display
the function context in which the matches occur.
- `navigate` keybindings jump between match function contexts under
`git grep -p` and between matching lines under `git grep -W`.
Thanks @zachriggle for the proposal.
Fixes #769
|
|
|
|
The fake value is valid for exactly one call, the state for
this is stored per-thread.
|
|
|
|
|
|
|