Commit Graph

726 Commits

Author SHA1 Message Date
David Refoua
3ea9728ffd
Merge pull request #2861 from chrisant996/chrisant_fix_2859
Fix #2859; script error when cwd name contains `%`
2023-07-25 17:18:22 +03:30
github-actions[bot]
9be28807cb
⬆️ Update dependencies (conemu-maximus5 v23.07.24) (#2863)
Co-authored-by: DRSDavidSoft <DRSDavidSoft@users.noreply.github.com>
2023-07-24 14:55:59 +01:00
github-actions[bot]
e2168a361c
⬆️ Update dependencies (git-for-windows v2.41.0.windows.3, clink v1.5.1, conemu-maximus5 v23.07.23, clink-completions v0.4.10) (#2850)
Co-authored-by: DRSDavidSoft <DRSDavidSoft@users.noreply.github.com>
2023-07-24 09:29:50 +01:00
Chris Antos
84ee96c64f Fix #2859; script error when cwd name contains %
The `string.gsub()` function in Lua always uses Lua patterns (which are
similar to regular expressions).  Cmder's custom prompt wants to perform
simple plain text find/replace operations on strings.  `string.gsub()`
is the right Lua function for that, but since it always uses Lua
patterns it's necessary to apply escaping to the input strings otherwise
they can get misinterpreted and cause runtime errors.

For example, if the current working directory name contains a percent
sign, such as literally "My%20Home".

This change fixes that.  It introduces a helper function `gsub_plain()`
which behaves like `string.gsub()` but applies appropriate escaping to
convert the plain text input strings into the corresponding Lua
patterns so that it can achieve plain text find/replace operations.

It also introduces separate helper functions for escaping the `find` and
`replace` parameters for `string.gsub()`, since they have different
escaping rules.
2023-07-10 18:07:53 -07:00
David Refoua
e9750ab73d
avoid erroneous messages, skip clink if injection fails fatally 2023-07-04 12:10:32 +03:30
Martin Kemp
34f2aabb8e
Remove PSGet Entirely
Fixes #2841

Signed-off-by: Martin Kemp <me@martinke.mp>
2023-05-23 11:11:39 +01:00
David Refoua
845720e25a
Merge pull request #2847 from chrisant996/fix_2846
Fix 2846
2023-05-17 11:30:13 +03:30
DRSDavidSoft
48e4dff882 ⬆️ Update dependencies (clink-completions v0.4.8) 2023-05-16 13:40:42 +00:00
Chris Antos
a605ec520d Clean luacheck warnings. 2023-05-15 09:18:59 -07:00
Chris Antos
5fab87f4d6 Remove unused function.
The `get_hg_status()` function has been unused since commit
35eab7a51a in 2018.
2023-05-15 09:18:47 -07:00
Chris Antos
c9153c96bf Fix global Lua namespace pollution.
Some variables were global when the intent was to be local variables.
2023-05-15 09:17:01 -07:00
Chris Antos
74381ecd19 Fix #2846; errors when git/svn/hg not installed.
Also fixes error when HEAD is not available in a git repo, e.g. due to a
corrupt repo.
2023-05-15 09:15:36 -07:00
DRSDavidSoft
7b880efda4 ⬆️ Update dependencies (git-for-windows v2.40.1.windows.1) 2023-04-26 13:40:36 +00:00
DRSDavidSoft
7daeb465e8 ⬆️ Update dependencies (clink v1.4.24) 2023-04-24 13:41:39 +00:00
DRSDavidSoft
36ad85c7b7 ⬆️ Update dependencies (git-for-windows v2.40.0.windows.1, clink v1.4.23) 2023-03-16 13:43:09 +00:00
DRSDavidSoft
4efbe0bd62 ⬆️ Update dependencies (git-for-windows v2.40.0-rc2.windows.1, clink v1.4.22, clink-completions v0.4.7) 2023-03-10 13:42:19 +00:00
Dax T. Games
d82fece61e Remove unnecessary git actions in fiast init 2023-01-23 19:16:44 -08:00
Dax T. Games
6bd2e260f0 Add time to debug output 2023-01-22 12:30:30 -08:00
DRSDavidSoft
9e87f375f1 ⬆️ Update dependencies (clink v1.4.10) 2023-01-16 13:41:30 +00:00
DRSDavidSoft
0b01ea6f63 ⬆️ Update dependencies (clink v1.4.9, clink-completions v0.4.4) 2023-01-15 13:41:12 +00:00
DRSDavidSoft
5135370ec1 ⬆️ Update dependencies (git-for-windows v2.39.0.windows.2, clink v1.4.6) 2022-12-22 13:40:52 +00:00
DRSDavidSoft
a03ad615f1 ⬆️ Update dependencies (clink v1.4.5) 2022-12-21 13:40:56 +00:00
David Refoua
8b3f38ad21 fix misspellings 2022-12-21 02:35:11 +03:30
David Refoua
9e55c48200 fix checking for clink injection 2022-12-21 02:29:31 +03:30
Brian Dukes
e1bf703f50
Fix error from profile.d PowerShell scripts
When there are `ps1` files in `profile.d`, the following error is logged:

>A positional parameter cannot be found that accepts argument 'Sourcing'.
2022-12-20 10:50:44 -06:00
David Refoua
2e9b512102
adjust history settings to more suitable default values 2022-12-20 10:45:09 +03:30
Martin Kemp
470808838f
TotalSecond -> TotalSeconds
Signed-off-by: Martin Kemp <me@martinke.mp>
2022-12-19 10:15:02 +00:00
Martin Kemp
328f4b3073
Use New-TimeSpan to calculate total elapsed time
Fixes #2797

Signed-off-by: Martin Kemp <me@martinke.mp>
2022-12-19 10:13:34 +00:00
Martin Kemp
efa2e576d0
Update conemu to mitigate CVE-2022-46387 (#2794)
Signed-off-by: Martin Kemp <me@martinke.mp>

Signed-off-by: Martin Kemp <me@martinke.mp>
2022-12-19 08:33:35 +00:00
DRSDavidSoft
9d2ac373c5 ⬆️ Update dependencies (clink v1.4.4) 2022-12-14 13:41:25 +00:00
DRSDavidSoft
271fe4c822 ⬆️ Update dependencies (git-for-windows v2.39.0.windows.1, clink v1.4.3, clink-completions v0.4.2) 2022-12-13 13:41:54 +00:00
Chris Antos
0fdcda98cf Fix https://github.com/cmderdev/cmder/issues/2789
Holding ^C made git.exe hang while cmd.exe (Clink) updated the prompt.

The prompt script had three problems:

1.  It invoked `git config` every time a prompt was displayed, to
    figure out where to skip invoking `git status`.  But it even did
    that if the current directory wasn't part of a git repo.
2.  It invoked `git config` two times for every single prompt, to
    attempt to improve performance if the user disables `git status`
    coloring.  But two times for every single prompt is expensive, so
    it has the opposite effect in the general case, and noticeably
    degrades performance.
3.  It invoked `git config` using a blocking call, instead of using the
    async prompt support in Clink.  That significantly reduced the
    benefit of having used async prompt filtering for `git status`.

Now the `git config` invocations use async prompt filtering, which lets
the prompt display instantaneously.  It also now uses a timer to avoid
invoking `git config` repeatedly when new prompts show up in rapid
succession.

Also, the `cmderGitStatusOptIn` variable is no longer leaked into the
Lua global namespace.

These changes resolve the issue: holding ^C is very fast and no longer
causes git.exe to hang.
2022-12-05 13:52:14 -08:00
Dax T. Games
42df6cd05b fix git bash GIT_INSTALL_ROOT 2022-11-19 02:32:02 +00:00
DRSDavidSoft
0adbc47c7e ⬆️ Update dependencies (clink v1.4.0) 2022-11-07 13:54:22 +00:00
David Refoua
ba97011bbc changes to letter casing in variable 2022-11-06 23:19:01 +03:30
David Refoua
048692b5b5 describe color codes in order 2022-11-06 11:50:22 +03:30
David Refoua
7c74931af8 revert a letter case 2022-11-06 11:47:23 +03:30
David Refoua
e3d9f81e25 add prompt for vanilla cmd.exe when clink not present 2022-11-06 11:37:58 +03:30
David Refoua
7c309c6a7b add link to documentation in comment 2022-11-06 11:36:03 +03:30
David Refoua
0c1ab3fbb1 powershell: fixes for first time launch 2022-11-06 11:34:27 +03:30
David Refoua
fc44def0ad make powershell scripts consistent 2022-11-06 11:32:22 +03:30
David Refoua
4e1918dcf7 formatting 2022-11-04 12:58:24 +03:30
David Refoua
dcc06a9d70 add excd (#1051) 2022-11-02 19:15:58 +03:30
github-actions[bot]
3214a6d5ea
⬆️ Update dependencies (clink v1.3.51) (#2776)
Co-authored-by: DRSDavidSoft <DRSDavidSoft@users.noreply.github.com>
2022-11-01 10:31:34 +00:00
DRSDavidSoft
c8d48b7f3e ⬆️ Update dependencies (clink v1.3.50) 2022-10-26 13:56:46 +00:00
David Refoua
a2a996147e adjust root path 2022-10-25 18:42:30 +03:30
David Refoua
c0fc10009a use colons for batch labels 2022-10-25 00:13:21 +03:30
David Refoua
cc5e4a0e60 fix a misspelling 2022-10-24 21:20:52 +03:30
David Refoua
6e0e1729d8 use a variable to keep DRY 2022-10-24 21:01:55 +03:30
David Refoua
0b7e47cdc2 add new alias for file listing 2022-10-24 20:38:09 +03:30