Skip to content

Rename hist command to something less likely to be a shell builtin #54

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

Open
kqr opened this issue Nov 19, 2019 · 2 comments
Open

Rename hist command to something less likely to be a shell builtin #54

kqr opened this issue Nov 19, 2019 · 2 comments

Comments

@kqr
Copy link

kqr commented Nov 19, 2019

My shell (ksh93) informs me that

$ type -a hist
hist is a shell builtin
hist is /Library/Frameworks/Python.framework/Versions/3.6/bin/hist
hist is an undefined function

in other words, if I try to run hist I will get the shell builtin first. I can circumvent that by using the env program, but this is not obvious right away.

@AloisMahdal
Copy link

Just an observer here, but...

What is likely to be builtin really depends on what shell whoever is using, and there are enough shells there so changing API just because one of them does not seem to be good enough reason.

POSIX sh builtins (hist is not one of them, according to posix manpages on Fedora 30) would get exception as most of them is almost guarranteed to be in many shells, but then again, POSIX itself defines command so you can work around your problem by calling

command hist

(for interactive usage, you could do something like, alias bpl_hist='command hist' could be better.

That said, if bashplotlib would want to avoid conflicts altogether, renaming all commands to eg. bashplotlib-hist, etc. could be one solution but it seems like overkill though... :)

@kqr
Copy link
Author

kqr commented Dec 2, 2019

Well, it's not like ksh93 is one of the new shells with a small user base. It's also not like it changes a lot -- it's been there since at least 1993.

I respect whatever decision you make, I'm just pointing out that the current failure mode in one of the older, bigger shells is a terrible user experience. If it's not fixed, it should at the very least be documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants