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

fix(man): Use cat as man pager #909

Merged
merged 2 commits into from
Jul 15, 2023
Merged
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions server/src/util/sh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const WORDS_WITHOUT_DOCUMENTATION = new Set([
])

/**
* Get documentation for the given word by usingZZ help and man.
* Get documentation for the given word by using help and man.
*/
export async function getShellDocumentationWithoutCache({
word,
Expand All @@ -73,7 +73,7 @@ export async function getShellDocumentationWithoutCache({
// We have experimented with setting MANWIDTH to different values for reformatting.
// The default line width of the terminal works fine for hover, but could be better
// for completions.
{ type: 'man', command: `man ${word} | col -bx` },
{ type: 'man', command: `man -P cat ${word} | col -bx` },
]

for (const { type, command } of DOCUMENTATION_COMMANDS) {
Expand Down