Skip to content

Commit ab69bd9

Browse files
committed
⚡ Short output length
1 parent 2e03a3b commit ab69bd9

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ repos:
2121
- id: check-toml
2222
- id: check-json
2323
- repo: https://github.com/Lucas-C/pre-commit-hooks
24-
rev: v1.5.1
24+
rev: v1.5.4
2525
hooks:
2626
- id: remove-crlf
2727
- repo: https://github.com/codespell-project/codespell
@@ -72,7 +72,7 @@ repos:
7272
additional_dependencies:
7373
7474
- repo: https://github.com/psf/black
75-
rev: 23.3.0
75+
rev: 23.7.0
7676
hooks:
7777
- id: black
7878
- repo: https://github.com/PyCQA/isort
@@ -86,7 +86,7 @@ repos:
8686
additional_dependencies:
8787
- tomli
8888
- repo: https://github.com/kumaraditya303/mirrors-pyright
89-
rev: v1.1.316
89+
rev: v1.1.322
9090
hooks:
9191
- id: pyright
9292
- repo: https://github.com/PyCQA/bandit

prompt-style.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,12 @@ local function generate_ps1(char, sections)
114114
local fg, bg, text = table.unpack(v)
115115
if type(text) == "function" then text = text() end
116116
text = string.format(format, text)
117-
if last_bg ~= "" then
118-
ps1 = ps1 .. "%{" .. last_bg .. " " .. bg .. "bg}" .. sep
117+
if last_bg == "" then
118+
ps1 = ps1 .. "%{" .. fg .. " " .. bg .. "bg}" .. text
119+
else
120+
ps1 = ps1 .. "%{" .. last_bg .. " " .. bg .. "bg}" .. sep ..
121+
"%{" .. fg .. "}" .. text
119122
end
120-
ps1 = ps1 .. "%{" .. fg .. " " .. bg .. "bg}" .. text
121123
last_bg = bg
122124
end
123125
end

0 commit comments

Comments
 (0)