1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-14 11:02:27 +03:00
Commit Graph

67 Commits

Author SHA1 Message Date
68edfa20b4 Add function os.PasteFromClipboard
And a user config to override it with a custom command.
2024-06-26 22:20:54 +02:00
fdff2dec79 Remove redundant variable dedeclarations
In go 1.22, loop variables are redeclared with each iteration of the
loop, rather than simple updated on each iteration. This means that we
no longer need to manually redeclare variables when they're closed over
by a function.
2024-05-19 16:38:21 +10:00
b7ba06fa5b Moves log related translations into its own Tr.Log. namespace 2023-07-31 19:42:41 -04:00
51e205ce11 Moves hard coded strings for LogCommand to i18n. 2023-07-31 19:35:55 -04:00
e33fe37a99 Standardise on using lo for slice functions
We've been sometimes using lo and sometimes using my slices package, and we need to pick one
for consistency. Lo is more extensive and better maintained so we're going with that.

My slices package was a superset of go's own slices package so in some places I've just used
the official one (the methods were just wrappers anyway).

I've also moved the remaining methods into the utils package.
2023-07-30 18:51:23 +10:00
d7f84aed8a feat: add os.copyToClipboardCmd to allow for a custom command
Issue #1055

test: CopyPatchToClipboard (temporary commit for review)
2023-07-29 19:09:59 +10:00
63dc07fded Construct arg vector manually rather than parse string
By constructing an arg vector manually, we no longer need to quote arguments

Mandate that args must be passed when building a command

Now you need to provide an args array when building a command.
There are a handful of places where we need to deal with a string,
such as with user-defined custom commands, and for those we now require
that at the callsite they use str.ToArgv to do that. I don't want
to provide a method out of the box for it because I want to discourage its
use.

For some reason we were invoking a command through a shell when amending a
commit, and I don't believe we needed to do that as there was nothing user-
supplied about the command. So I've switched to using a regular command out-
side the shell there
2023-05-23 19:49:19 +10:00
e4e16fa38e Change OpenCommand to Open and OpenLinkCommand to OpenLink
We do this for consistency with the edit settings. The old names are kept as a
fallback for now.
2023-04-13 13:14:00 +02:00
b7e029adc7 Don't set platform defaults on OSConfig struct immediately
Instead, query the platform defaults only if the config is empty. This will be
necessary later to distinguish an empty config from a default config, so that we
can give deprecation warnings.
2023-04-13 13:14:00 +02:00
08d679c3a8 Remove line number support for "open" command
The "open" command is supposed to behave in the same way as double-clicking a
file in the Finder/Explorer. The concept of jumping to a specific line in the
file doesn't make sense for this; use "edit" instead.
2023-04-13 13:14:00 +02:00
b8900baf1a remove deprecated calls 2022-09-17 15:10:41 -07:00
64224e7caa Update pkg/commands/oscommands/os.go
Co-authored-by: Ryoga <eial5q265e5+github@gmail.com>
2022-08-03 13:57:26 +02:00
d56bb0b8ef Fix the integration test 2022-08-03 07:55:51 +02:00
86d5654d20 Preserve trailing newline setting when adding to gitignore 2022-08-03 07:55:51 +02:00
c9d891a913 better process killing 2022-06-18 13:39:22 +10:00
86c259623c feat: fix permission problem of temp dirs 2022-04-02 08:48:38 +11:00
2fbb52fa2c chore: remove dead code 2022-04-02 08:48:38 +11:00
bf4f06ab4e more generics 2022-03-24 20:14:41 +11:00
a34bdf1a04 update linters 2022-03-19 12:12:57 +11:00
cd31a762b9 rename OSCommand field to os 2022-03-17 19:13:40 +11:00
a78cbf4882 remove redundant title-setting shell command args 2022-01-21 23:13:39 +11:00
62a7d9bbcc invoke title-setting shell command appropriately 2022-01-21 23:13:39 +11:00
555d8bbc96 set repo name as window title when loading repo, fix #1691 2022-01-21 23:13:39 +11:00
3621854dc7 fix tests 2022-01-09 14:09:53 +11:00
007235df23 refactor 2022-01-09 14:09:53 +11:00
f503ff1ecb start breaking up git struct 2022-01-09 14:09:53 +11:00
93729ba61b fix some things 2022-01-07 10:52:51 +11:00
91fe68576c refactor 2022-01-07 10:52:51 +11:00
05fa483f48 simplify how we log commands 2022-01-07 10:52:51 +11:00
95b2e9540a update tests 2022-01-04 09:07:15 +11:00
2cb8aff940 no more mocking command 2022-01-04 09:07:15 +11:00
9b2b0fc122 WIP 2022-01-04 09:07:15 +11:00
b028f37ba8 updating specs 2022-01-04 09:07:15 +11:00
9d4ff6b465 fix logging 2022-01-04 09:07:15 +11:00
95f4ceea34 refactor 2022-01-04 09:07:15 +11:00
43a4fa970d WIP 2022-01-04 09:07:15 +11:00
03b946cc8f no more config in git command struct 2022-01-04 09:07:15 +11:00
18ab086126 introduce Common struct for passing around common stuff 2022-01-04 09:07:15 +11:00
b4c078d565 WIP 2022-01-04 09:07:15 +11:00
f704707d29 stream output from certain git commands in command log panel 2021-10-30 18:26:06 +11:00
6388af70ac simplify pull logic 2021-10-22 21:33:17 +11:00
1e50764b4d Fix tests 2021-10-17 11:00:20 +11:00
4171b7613c Use replacer 2021-10-16 22:40:50 +11:00
92f03a7872 Escape special characters 2021-10-16 22:40:50 +11:00
7b615e3186 Fix open link command in Windows 2021-10-16 22:40:50 +11:00
87e9d9bdc2 minor changes 2021-10-16 21:18:43 +11:00
c3d7de1c18 Change not to use cat command 2021-08-25 21:32:48 +10:00
028cb2be2f add extra quoting for shell cmd string on linux
This solves an issue where we could not open files with names that contained
spaces and single quotes.
It also  solves an issue of variable expansion for files with some kind
of environment variables on the name e.g. '$USER.txt'
2021-07-27 20:28:00 +10:00
6137d66914 no need to log this 2021-04-11 17:07:49 +10:00
74320f0075 more logging of commands 2021-04-11 17:07:49 +10:00