Skip to content

Commit c285805

Browse files
armano2escapedcat
authored andcommitted
fix: correct issue with mac-os tab completion
1 parent 1f912c2 commit c285805

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

@commitlint/prompt/src/inquirer/InputCustomPrompt.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,9 @@ export default class InputCustomPrompt<
5656
* @see https://nodejs.org/api/readline.html#readline_rl_line
5757
*/
5858
updateLine(line: string): void {
59-
/* eslint-disable @typescript-eslint/ban-ts-comment */
60-
// @ts-ignore
61-
this.rl.line = line;
62-
// @ts-ignore
63-
this.rl.write(null, {ctrl: true, name: 'e'});
59+
this.rl.write(null as any, {ctrl: true, name: 'b'});
60+
this.rl.write(null as any, {ctrl: true, name: 'd'});
61+
this.rl.write(line.substr(this.rl.line.length));
6462
}
6563

6664
onKeyPress2(e: KeyDescriptor): void {

0 commit comments

Comments
 (0)