Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ls: Fix listing help formatting. #136

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/commands/__tests__/__snapshots__/ls.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ exports[`ls when valid ls command should print friendly message if no items: std
exports[`ls when valid ls command should print list response: stderr 1`] = `
[
[
"Showing destinations. Resources labeled with * are already accessible to you:",
"Showing destinations.
Resources labeled with * are already accessible to you:",
],
]
`;
Expand Down
5 changes: 2 additions & 3 deletions src/commands/ls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,11 @@ const ls = async (
const postfixPart = data.term
? ` matching '${data.term}'`
: data.isTruncated
? ` (use \`p0
${allArguments.join(" ")} <like>\` to narrow results)`
? ` (use \`p0 ${allArguments.join(" ")} <like>\` to narrow results)`
: "";

print2(
`Showing${truncationPart} ${label}${postfixPart}. Resources labeled with * are already accessible to you:`
`Showing${truncationPart} ${label}${postfixPart}.\nResources labeled with * are already accessible to you:`
);
const sortedItems = orderBy(data.items, "isPreexisting", "desc");
const isSameValue = sortedItems.every((i) => !i.group && i.key === i.value);
Expand Down
Loading