diff options
-rw-r--r-- | shell/ash.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/shell/ash.c b/shell/ash.c index 60c8ffeb7..eb51d47cc 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -8163,7 +8163,6 @@ static int | |||
8163 | describe_command(char *command, const char *path, int describe_command_verbose) | 8163 | describe_command(char *command, const char *path, int describe_command_verbose) |
8164 | { | 8164 | { |
8165 | struct cmdentry entry; | 8165 | struct cmdentry entry; |
8166 | struct tblentry *cmdp; | ||
8167 | #if ENABLE_ASH_ALIAS | 8166 | #if ENABLE_ASH_ALIAS |
8168 | const struct alias *ap; | 8167 | const struct alias *ap; |
8169 | #endif | 8168 | #endif |
@@ -8193,15 +8192,8 @@ describe_command(char *command, const char *path, int describe_command_verbose) | |||
8193 | goto out; | 8192 | goto out; |
8194 | } | 8193 | } |
8195 | #endif | 8194 | #endif |
8196 | /* Then check if it is a tracked alias */ | 8195 | /* Brute force */ |
8197 | cmdp = cmdlookup(command, 0); | 8196 | find_command(command, &entry, DO_ABS, path); |
8198 | if (cmdp != NULL) { | ||
8199 | entry.cmdtype = cmdp->cmdtype; | ||
8200 | entry.u = cmdp->param; | ||
8201 | } else { | ||
8202 | /* Finally use brute force */ | ||
8203 | find_command(command, &entry, DO_ABS, path); | ||
8204 | } | ||
8205 | 8197 | ||
8206 | switch (entry.cmdtype) { | 8198 | switch (entry.cmdtype) { |
8207 | case CMDNORMAL: { | 8199 | case CMDNORMAL: { |
@@ -8216,9 +8208,7 @@ describe_command(char *command, const char *path, int describe_command_verbose) | |||
8216 | } while (--j >= 0); | 8208 | } while (--j >= 0); |
8217 | } | 8209 | } |
8218 | if (describe_command_verbose) { | 8210 | if (describe_command_verbose) { |
8219 | out1fmt(" is%s %s", | 8211 | out1fmt(" is %s", p); |
8220 | (cmdp ? " a tracked alias for" : nullstr), p | ||
8221 | ); | ||
8222 | } else { | 8212 | } else { |
8223 | out1str(p); | 8213 | out1str(p); |
8224 | } | 8214 | } |