-
Notifications
You must be signed in to change notification settings - Fork 27
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
Updated install, segments error #100
Comments
oh, that's weird. And also dividing by the total segment count without checking for 0 is bad. :/ You do have segments defined in you config I assume? And this happens in a new shell too? |
This is a "new" sbp install, so everything is as it was delivered, no changes to config/etc.
|
Right, so I'm guessing for some reason your local config wasn't created. is |
It would be interesting to see what happens if you set |
|
Nothing happens running the export, and sbp reload has same error -
|
I removed |
That's really odd. What does the '*' mean at the file listing you posted 3 days ago btw? Is that symlinks or some permission indicator? |
Ok, i'm still off on something, this doesn't make sense (i'll open a new issue if you'd like)
|
Yeah, this appears to be the plain layout. Did you install both through git and through homebrew? The weird thing to me is that if SBP couldn't read the config, it should complain and try to recreate it. If it does find it, it should use it, or fall back to plain if nothing is set. But the fact that |
Today I encountered the same problem when I updated diff -bwur /home/murase/.config/sbp.bk/settings.conf /home/murase/.config/sbp/settings.conf
--- /home/murase/.config/sbp.bk/settings.conf^I2019-12-29 21:03:05.673117814 +0900
+++ /home/murase/.config/sbp/settings.conf^I2022-01-20 18:17:46.564313860 +0900
@@ -1,33 +1,33 @@
[...]
-# a multiplexer?
-if [[ "$TERM" = "screen" || -n "$TMUX" ]]; then
- # We're inside tmux or screen
- settings_segments_left=('path' 'python_env' 'git' 'commend')
- settings_segments_right=('')
+# a small window?
+
+if [[ "$COLUMNS" -le 120 ]]; then
+ # Let's adjust to the smaller screen
+ SBP_THEME_LAYOUT='lines'
+ SBP_SEGMENTS_LEFT=('path' 'python_env' 'git' 'command')
else
- settings_segments_left=('host' 'path' 'python_env' 'git' )
- settings_segments_right=('command' 'timestamp')
+ SBP_SEGMENTS_LEFT=('host' 'path' 'python_env' 'k8s' 'git' 'nix')
+ SBP_SEGMENTS_RIGHT=('command' 'timestamp')
+ SBP_SEGMENTS_LINE_TWO=('prompt_ready')
fi I think |
Agreed, I actually thought that was in place for this use case. :/ |
Thanks. I've identified that the change was introduced in I guess the change introduced in |
@brujoand Maybe I can create a PR to resolve this issue.
|
I encountered this error when I maximized my terminal window. Later I found that I edited my ~/.config/sbp/settings.conf file and I deleted the lines inside the if condition where small screen adjustment was made. That's why it worked when the width is less than equal half my workspace. |
Describe the bug
Updated to latest via homebrew, run sbp reload and get -
/usr/local/opt/sbp/src/main.bash: line 30: COLUMNS / total_segment_count : division by 0 (error token is "total_segment_count ")
To Reproduce
Steps to reproduce the behavior:
Expected behavior
sbp prompt loads
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: