-
Notifications
You must be signed in to change notification settings - Fork 17
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
Shell code appears before "Advanced Shell History enabled: session ..." #12
Comments
I'm seeing the same shell-barf. Ubuntu It only seems to happen the first time I ran shellcheck on
I wish my bash-fu were better to provide some more insight, but alas. However here's an interesting anecdote which might shed some light. In my
which just prints the ANSII shell colors and their number, and whenever I would ... okay that was a dead end, but I think I tracked it down to sourcing of the common script. I modified
and boom, the problem is gone. Personally, I don't care about the possibility of accidentally running the dunder functions, so I plan on just leaving it commented out. Oh, and
|
For what it's worth, shellcheck does not support zsh. This doesn't mean all advice will be useless, as plenty of zsh's behavior is POSIX compliant, but it's good to keep in mind. I have/had the same problem with |
Yeah, I know shellcheck does not support zsh, but I try to write bash- or sh-compliant scripts regardless as sometimes I need to port them to systems without zsh. |
Workaround for issue barabo#12
I use ZSH. I have put the following code in my zshrc:
When I start zsh, the following appears above my prompt.
I had only expected the last line, not the two function definitions. I noticed the reporter of #8 had the same, but it seemed unrelated to their issue.
(Seemingly) relevant environment variables:
zsh version:
5.6.2 (x86_64-pc-linux-gnu)
ash commit:
3a9b1fc2fcbe57496a70ec062cc0a4fdb1bb2ad5
The text was updated successfully, but these errors were encountered: