1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-14 11:23:09 +02:00
Commit Graph

61 Commits

Author SHA1 Message Date
Jesse Duffield
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
Stefan Haller
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
Stefan Haller
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
Stefan Haller
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
jiepeng
b8900baf1a remove deprecated calls 2022-09-17 15:10:41 -07:00
Luka Markušić
64224e7caa
Update pkg/commands/oscommands/os.go
Co-authored-by: Ryoga <eial5q265e5+github@gmail.com>
2022-08-03 13:57:26 +02:00
Luka Markušić
d56bb0b8ef Fix the integration test 2022-08-03 07:55:51 +02:00
Luka Markušić
86d5654d20 Preserve trailing newline setting when adding to gitignore 2022-08-03 07:55:51 +02:00
Jesse Duffield
c9d891a913 better process killing 2022-06-18 13:39:22 +10:00
Ryooooooga
86c259623c feat: fix permission problem of temp dirs 2022-04-02 08:48:38 +11:00
Ryooooooga
2fbb52fa2c chore: remove dead code 2022-04-02 08:48:38 +11:00
Jesse Duffield
bf4f06ab4e more generics 2022-03-24 20:14:41 +11:00
Jesse Duffield
a34bdf1a04 update linters 2022-03-19 12:12:57 +11:00
Jesse Duffield
cd31a762b9 rename OSCommand field to os 2022-03-17 19:13:40 +11:00
Birger Skogeng Pedersen
a78cbf4882 remove redundant title-setting shell command args 2022-01-21 23:13:39 +11:00
Birger Skogeng Pedersen
62a7d9bbcc invoke title-setting shell command appropriately 2022-01-21 23:13:39 +11:00
Birger Skogeng Pedersen
555d8bbc96 set repo name as window title when loading repo, fix #1691 2022-01-21 23:13:39 +11:00
Jesse Duffield
3621854dc7 fix tests 2022-01-09 14:09:53 +11:00
Jesse Duffield
007235df23 refactor 2022-01-09 14:09:53 +11:00
Jesse Duffield
f503ff1ecb start breaking up git struct 2022-01-09 14:09:53 +11:00
Jesse Duffield
93729ba61b fix some things 2022-01-07 10:52:51 +11:00
Jesse Duffield
91fe68576c refactor 2022-01-07 10:52:51 +11:00
Jesse Duffield
05fa483f48 simplify how we log commands 2022-01-07 10:52:51 +11:00
Jesse Duffield
95b2e9540a update tests 2022-01-04 09:07:15 +11:00
Jesse Duffield
2cb8aff940 no more mocking command 2022-01-04 09:07:15 +11:00
Jesse Duffield
9b2b0fc122 WIP 2022-01-04 09:07:15 +11:00
Jesse Duffield
b028f37ba8 updating specs 2022-01-04 09:07:15 +11:00
Jesse Duffield
9d4ff6b465 fix logging 2022-01-04 09:07:15 +11:00
Jesse Duffield
95f4ceea34 refactor 2022-01-04 09:07:15 +11:00
Jesse Duffield
43a4fa970d WIP 2022-01-04 09:07:15 +11:00
Jesse Duffield
03b946cc8f no more config in git command struct 2022-01-04 09:07:15 +11:00
Jesse Duffield
18ab086126 introduce Common struct for passing around common stuff 2022-01-04 09:07:15 +11:00
Jesse Duffield
b4c078d565 WIP 2022-01-04 09:07:15 +11:00
Jesse Duffield
f704707d29 stream output from certain git commands in command log panel 2021-10-30 18:26:06 +11:00
Jesse Duffield
6388af70ac simplify pull logic 2021-10-22 21:33:17 +11:00
Ryooooooga
1e50764b4d Fix tests 2021-10-17 11:00:20 +11:00
Ryooooooga
4171b7613c Use replacer 2021-10-16 22:40:50 +11:00
Ryooooooga
92f03a7872 Escape special characters 2021-10-16 22:40:50 +11:00
Ryooooooga
7b615e3186 Fix open link command in Windows 2021-10-16 22:40:50 +11:00
Jesse Duffield
87e9d9bdc2 minor changes 2021-10-16 21:18:43 +11:00
Ryooooooga
c3d7de1c18 Change not to use cat command 2021-08-25 21:32:48 +10:00
Francisco Miamoto
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
Jesse Duffield
6137d66914 no need to log this 2021-04-11 17:07:49 +10:00
Jesse Duffield
74320f0075 more logging of commands 2021-04-11 17:07:49 +10:00
Jesse Duffield
bb918b579a start adding support for logging of commands 2021-04-11 17:07:49 +10:00
Jesse Duffield
e145090046 add cmdLog panel 2021-04-11 17:07:49 +10:00
Jesse Duffield
e04e2ebab5 try better logging for CI 2021-04-06 19:34:32 +10:00
Jesse Duffield
c33f8d2790 prevent git from prompting user if program is run directly 2021-04-06 19:34:32 +10:00
Jesse Duffield
8901d11674 fix merge conflict cat issue on windows 2021-04-02 13:15:07 +11:00
Jesse Duffield
e8e59306fc shell out custom commands 2021-04-01 20:25:30 +11:00