-
-
Notifications
You must be signed in to change notification settings - Fork 616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"_command_exists" used in battery plugin but is not defined anywhere! #68
Comments
ASIDE: I also recommend breaking the percentage bar graph out to a separate utility. I have found ahaving a script to generate a bar graph from a percentage is a very useful thing to have. |
Assigned P2 as bug. Investigation needed -> Currently fix unknown. |
@antofthy |
Lowering priority untill info is provided |
More information... Okay... The plug-in " On the other hand in " command_exists () {
type "$1" &> /dev/null ;
} And in " type_exists() {
if [ "$(type -P "$1")" ]; then
return 0
fi
return 1
} Which could be rewritten more concisely as... type_exists() {
[ "$(type -P "$1")" ]
} Though checks if the given argument is an external command, and ignores functions of the same name. But its is used for same purpose. In summery. The plug-in is broken. And in looking for a fix I found the two different functions being used for the same purpose. One probably should replace the other. |
Fixed by suggestion ohmybash#68 (comment) Bug: ohmybash#68
contributions are welcomed since i'm trying to improve the code quality pasively (since it needs rewriting of lots of things) EDIT: Note #73 About the Edit: To clarify oh-my-bash should be able to source ping @nntoan How do you want to resolve conflicts alike? |
Fixed by suggestion #68 (comment) Bug: #68
Fixed by suggestion ohmybash#68 (comment) Bug: ohmybash#68
TLDR:
command_exists()
is defined inoh-my-bash/lib/base.sh
Line 267 in 429ffc1
_command_exists()
where_
prefix is important.Summarized by @Kreyren
Title basically says it all...
A function "
_command_exists
" is used in the battery plugin, but is not defined anywhere else in the repository.... removed personal "
cmd_found
" equivalent function, designed for older shells ...The text was updated successfully, but these errors were encountered: