grep error on login, related to alias-completion
daniejstriata opened this issue · comments
On some of the installs I get an error when I login the first time:
Usage: grep [OPTION]... PATTERN [FILE]...
I'm not able to replicate this or figure out why the grep error happens as it is not on all the hosts but when I disable alias-completion the error goes away.
Steps to Reproduce
- Login to server
- Grep error will be the last entry seen before the prompt.
Your Environment
-
Bash-it version used:
Version type: dev
Current git SHA: 447c89a on 2021-11-16T20:09:22+02:00
Commit info: 447c89a
Compare to latest: 447c89a...master -
List of enabled plugins, themes and aliases (use
bash-it show (plugins/themes/aliases)
):
Plugins used:
base
alias-completion -
bash-it doctor
output:
DEBUG: core: main: Loading libraries(except appearance)...
DEBUG: lib: helpers: Loading library file...
DEBUG: lib: log: Loading library file...
DEBUG: lib: preview: Loading library file...
DEBUG: lib: search: Loading library file...
DEBUG: lib: utilities: Loading library file...
DEBUG: vendor: Loading "preexec"...
DEBUG: core: reloader: Loading all enabled components...
DEBUG: aliases: general: Loading component...
WARN: aliases: general: Command 'gshuf' does not exist!
DEBUG: plugin: base: Loading component...
WARN: plugin: base: Command 'markdown' does not exist!
WARN: plugin: base: Command 'mkisofs' does not exist!
DEBUG: completion: bash-it: Loading component...
DEBUG: completion: system: Loading component...
DEBUG: core: reloader: Loading "nwinkler" theme...
WARN: themes: base: Command 'battery_percentage' does not exist!
DEBUG: core: main: Loading custom aliases, completion, plugins...
DEBUG: core: main: Loading general custom files...
DEBUG: custom: example: Loading custom file...
WARN: custom: example: Command 'reload' does not exist! -
Bash version:
bash-4.4.20-2.el8.x86_64 -
Operating System and version:
AlmalLinux 8.5
@daniejstriata, pls try to disable the alias-completion
plug-in and enable the aliases
completion. Does that remove the error?
@daniejstriata, pls try to disable the
alias-completion
plug-in and enable thealiases
completion. Does that remove the error?
I've just noticed this report is from a checkout from November, so you don't have an aliases
completion. I would recommend disabling that version of the aliases-completion
plug-in: It runs all defined aliases in an eval
at every load.
I'll delete and check it out again.
FYI
I got this error after disabling and enabling the plugin
-bash: /tmp/alias_completion-26879C0G9go: line 1: syntax error near unexpected token `cd'
-bash: /tmp/alias_completion-26879C0G9go: line 1: `cd - '
I deleted the .bash_it directory and checkedout a new version. This time around the alias completion plugin was not found when I logged in:
aliases enabled with priority 800.
alias-completion disabled.
-bash: /root/.bash_it/completion/aliases.completion.bash: No such file or directory
@daniejstriata, sorry, that last is a typo fixed in #2089 and you should only get that not-found error the first time it loads. Do you still get the syntax errors?
Aside: you can just run bash-it update
to get the new checkout. 👍
It is like you said. The first time give that error. now the second time now longer give syntax error near unexpected token
cd'` error.
Now everytime this happens:
Once I logged in again and get the error:
-bash: /root/.bash_it/completion/aliases.completion.bash: No such file or directory
I log out and log back in again. Then the plugin no longer shows that it is active
Pls disable the plugin alias-completion
and enable the completion aliases
. The error is fixed in #2089, which was just merged.
Thanks. I got this message when I logged in
aliases is already enabled.
alias-completion disabled.
I do not see aliases
under plugins to enable/disable it. The only plugin enabled is base
.
Now that #2089 is merged, you shouldn't see any of that again. The alias-completion
plugin should be disabled automatically, and the aliases
completion should be enabled automatically. Note that aliases
is a completion, not a plugin. It should have priority 800
. You can see it enabled as $BASH_IT/enabled/800---aliases.completion.bash
.
Thanks! Makes sense. All good.