Skip to content

Commit 2e429ae

Browse files
make ipc_fg_test and ipc_bg_test hidden from help
1 parent b0334e8 commit 2e429ae

5 files changed

Lines changed: 8 additions & 4 deletions

File tree

src/programs/@ALL.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ export { default as unalias } from "./unalias";
3232
export { default as ps } from "./ps";
3333
export { default as kill } from "./kill";
3434

35-
// export { default as ipc_bg_test } from "./ipc_bg_test";
36-
// export { default as ipc_fg_test } from "./ipc_fg_test";
35+
export { default as ipc_bg_test } from "./ipc_bg_test";
36+
export { default as ipc_fg_test } from "./ipc_fg_test";
3737

3838
// TODO: copy program
3939
// TODO: create an API for creating programs, mount any programs found in /bin/ (dont list in help)

src/programs/help.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export default {
159159
// if an argument remains, get help for it
160160
const program = registry.getProgram(args[0]);
161161

162-
if (program === undefined || program.hide_from_help) {
162+
if (program === undefined) {
163163
term.writeln(`${PREFABS.error}Could not resolve help for ${args[0]}.${STYLE.reset_all}`);
164164
return 1;
165165
}

src/programs/ipc_bg_test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export default {
55
description: "",
66
usage_suffix: "",
77
arg_descriptions: {},
8+
hide_from_help: true,
89
completion: async () => [],
910
main: async (data) => {
1011
// extract from data to make code less verbose
@@ -19,6 +20,8 @@ export default {
1920
});
2021
});
2122

23+
term.writeln("ipc_bg_test service started and listening for messages.");
24+
2225
return 0;
2326
}
2427
} as Program;

src/programs/ipc_fg_test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export default {
55
description: "",
66
usage_suffix: "",
77
arg_descriptions: {},
8+
hide_from_help: true,
89
completion: async () => [],
910
main: async (data) => {
1011
// extract from data to make code less verbose

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export interface Program {
1818
usage_suffix: string,
1919
arg_descriptions: arg_descriptions,
2020
node_opt_out?: boolean, // default false, if true it will not be registered if running in node
21-
hide_from_help?: boolean, // default false, if true it will be hidden from the help program, but can still be run by the user
21+
hide_from_help?: boolean, // default false, if true it will be hidden from the program listing in help, but can still be found by typing help <program>. useful for services
2222
main: ProgramMain,
2323
completion?: CompletionGenerator,
2424
}

0 commit comments

Comments
 (0)