1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-19 17:02:18 +03:00

23 Commits

Author SHA1 Message Date
Baptiste Ottino
1543b83d10 Fix opening links containing ampersands (&) in WSL
Opening links containing ampersands inside lazygit (a pull-request
creation page in BitBucket Server, for instance) returns the following
Powershell error:
> The ampersand (&) character is not allowed. The & operator is reserved
> for future use; wrap an ampersand in double quotation marks ("&") to
> pass it as part of a string.

We fix it by enclosing the URL in single quotes.
2024-12-04 09:43:30 +01:00
Baptiste Ottino
4cfeb18632 Fix opening files with explorer in WSL
The OS command to open file in explorer in WSL doesn't currently work as
expected; it always opens the file explorer at the default opening
location. This is because the {{filename}} variable returns the path in
WSL format, and not in the format expected by Windows.

We use wslpath, a utility shipped with WSL, to make the path conversion.
2024-12-04 09:43:30 +01:00
aritmos
68495ea0ee Fix container detection
Running WSL without a container would be treated as native linux, causing problems at it would then attempt to use `xdg-open`.
This was caused by `isContainer()` always returning true due to some dubious conditionals. These have been removed.

The env-var check seems to not be used by lazygit, nor any common containers, and therefore appears to only exist to manually tell lazygit to behave as if it were inside of a container.
This functionality has been kept, but the env-var has been changed to be all uppercaps as to comply with the POSIX standard.

Fixes #2757
Bug introduced in 4d78d76
2024-03-22 13:42:15 +01:00
Jesse Duffield
c92ed07082 Appease linter 2023-08-02 08:32:57 +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
659d668e16 Implement edit presets 2023-04-13 13:14:00 +02:00
Humble Penguin
dfe5c805c4 generated cheatsheets and ran code formatting 2023-03-05 07:06:34 +05:00
Humble Penguin
e94ff63bc5 issue #2473 2023-03-05 06:47:21 +05:00
John Shin
1eb47deae4 apply gofumpt 2022-07-03 02:00:40 -07:00
John Shin
4d54b3801f apply formatting 2022-06-11 23:23:22 -07:00
John Shin
3067c2c321 support open file and link on WSL 2022-06-11 23:18:29 -07:00
Ryooooooga
e5730cb80b
fix: improve default editCommandTemplate 2022-04-23 17:39:12 +09:00
Jesse Duffield
11acac0091 more explicit 2022-03-16 19:55:58 +11:00
Ryooooooga
7b615e3186 Fix open link command in Windows 2021-10-16 22:40:50 +11:00
Ryooooooga
ac609bd37c
fix backward compatibility 2021-08-04 18:43:34 +09:00
Ryooooooga
4f66093335
introduce edit command template to open a specifig line of a file 2021-08-03 21:42:14 +09:00
caojoshua
60468d2e17 Edit command as user OS config option 2021-06-05 10:58:09 +10:00
Jesse Duffield
4912205adb remove viper
WIP
2020-10-10 00:23:01 +11:00
Jesse Duffield
afd669194a use clipboard package to handle clipboard stuff 2020-08-26 07:53:43 +10:00
Jesse Duffield
2974a57943 support copying stuff to clipboard 2020-04-15 10:44:56 +00:00
Kristijan Husak
990dc8c4ea Add separate open command for links and check if branch exists on remote before opening pull request link. 2018-10-20 11:58:08 +02:00
Jesse Duffield
3f68fe42cb update xdg-open command 2018-09-04 19:18:18 +10:00
Jesse Duffield
d31520261f introduce platform specific defaults 2018-09-01 14:33:01 +10:00