ccstatusline 2.0.12 → 2.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -5
- package/dist/ccstatusline.js +16 -4
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -18,8 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
Original author: Matthew Breedlove (https://github.com/sirmalloc)
|
|
25
|
-
Official repository: https://github.com/sirmalloc/ccstatusline
|
|
21
|
+
SOFTWARE.
|
package/dist/ccstatusline.js
CHANGED
|
@@ -51374,7 +51374,7 @@ import { execSync as execSync3 } from "child_process";
|
|
|
51374
51374
|
import * as fs5 from "fs";
|
|
51375
51375
|
import * as path4 from "path";
|
|
51376
51376
|
var __dirname = "/Users/sirmalloc/Projects/Personal/ccstatusline/src/utils";
|
|
51377
|
-
var PACKAGE_VERSION = "2.0.
|
|
51377
|
+
var PACKAGE_VERSION = "2.0.13";
|
|
51378
51378
|
function getPackageVersion() {
|
|
51379
51379
|
if (/^\d+\.\d+\.\d+/.test(PACKAGE_VERSION)) {
|
|
51380
51380
|
return PACKAGE_VERSION;
|
|
@@ -52934,7 +52934,17 @@ function renderStatusLine(widgets, settings, context, preRenderedWidgets, preCal
|
|
|
52934
52934
|
if (!widget)
|
|
52935
52935
|
continue;
|
|
52936
52936
|
if (widget.type === "separator") {
|
|
52937
|
-
|
|
52937
|
+
let hasContentBefore = false;
|
|
52938
|
+
for (let j = i - 1;j >= 0; j--) {
|
|
52939
|
+
const prevWidget = widgets[j];
|
|
52940
|
+
if (prevWidget && prevWidget.type !== "separator" && prevWidget.type !== "flex-separator") {
|
|
52941
|
+
if (preRenderedWidgets[j]?.content) {
|
|
52942
|
+
hasContentBefore = true;
|
|
52943
|
+
break;
|
|
52944
|
+
}
|
|
52945
|
+
}
|
|
52946
|
+
}
|
|
52947
|
+
if (!hasContentBefore)
|
|
52938
52948
|
continue;
|
|
52939
52949
|
const sepChar = widget.character ?? (settings.defaultSeparator ?? "|");
|
|
52940
52950
|
const formattedSep = formatSeparator(sepChar);
|
|
@@ -54034,11 +54044,13 @@ class CurrentWorkingDirWidget {
|
|
|
54034
54044
|
const segments = item.metadata?.segments ? parseInt(item.metadata.segments, 10) : undefined;
|
|
54035
54045
|
let displayPath = cwd2;
|
|
54036
54046
|
if (segments && segments > 0) {
|
|
54037
|
-
const
|
|
54047
|
+
const useBackslash = cwd2.includes("\\") && !cwd2.includes("/");
|
|
54048
|
+
const outSep = useBackslash ? "\\" : "/";
|
|
54049
|
+
const pathParts = cwd2.split(/[\\/]+/);
|
|
54038
54050
|
const filteredParts = pathParts.filter((part) => part !== "");
|
|
54039
54051
|
if (filteredParts.length > segments) {
|
|
54040
54052
|
const selectedSegments = filteredParts.slice(-segments);
|
|
54041
|
-
displayPath = "
|
|
54053
|
+
displayPath = "..." + outSep + selectedSegments.join(outSep);
|
|
54042
54054
|
}
|
|
54043
54055
|
}
|
|
54044
54056
|
return item.rawValue ? displayPath : `cwd: ${displayPath}`;
|