SHLVL starts at 3?
Thanks for filing an issue! Please answer the questions below so I can help you.
- iTerm2 version: Build 3.3.6
- OS version: macOS Mojave 10.14.6 (18G1012)
- Attach ~/Library/Preferences/com.googlecode.iterm2.plist here (drag-drop from finder into this window)com.googlecode.iterm2.plist
- Attach a debug log, if possible. Instructions at https://iterm2.com/debuglog debuglog.txt
Detailed steps to reproduce the problem:
- Start a new session (tab, window, etc.).
- Run the command
echo $SHLVL
.
What happened:
The value of $SHLVL
is 3.
What should have happened:
The value of $SHLVL
should be 1.
I believe this functionality changed in the fairly recent past. Part of my prompt command adds something to my PS1
if $SHLVL
is greater than 1, and I just noticed that today. It's possible that it's been there for a while and I didn't notice, but I think it's new-ish.