Skip to content

Commit 552b105

Browse files
committed
Implement dummy compgen -A hostname
1 parent 83fafae commit 552b105

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/core/builtins/compgen.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ fn replace_args_compgen(args: &mut Vec<String>) -> bool {
7777
"file" => "-f",
7878
"user" => "-u",
7979
"setopt" => "-o",
80+
"hostname" => "-A hostname",
8081
"shopt" => "-A shopt",
8182
"stopped" => "-A stopped",
8283
"job" => "-j",
@@ -132,6 +133,7 @@ pub fn compgen(core: &mut ShellCore, args: &mut Vec<String>) -> i32 {
132133
"-j" => compgen_j(core, &mut args),
133134
"-u" => compgen_u(core, &mut args),
134135
"-v" => compgen_v(core, &mut args),
136+
"-A hostname" => compgen_hostname(core, &mut args),
135137
"-A shopt" => compgen_shopt(core, &mut args),
136138
"-A stopped" => compgen_stopped(core, &mut args),
137139
"-W" => {
@@ -356,6 +358,11 @@ pub fn compgen_shopt(core: &mut ShellCore, args: &mut Vec<String>) -> Vec<String
356358
ans
357359
}
358360

361+
pub fn compgen_hostname(core: &mut ShellCore, args: &mut Vec<String>) -> Vec<String> {
362+
//TODO: Implement!
363+
vec![]
364+
}
365+
359366
pub fn compgen_stopped(core: &mut ShellCore, args: &mut Vec<String>) -> Vec<String> {
360367
let mut ans = vec![];
361368

0 commit comments

Comments
 (0)