Comments (19)
Identify the faulty segment or take the whole statusright and run with
bash - x segment. sh
.
Erik Westrup [email protected]
(+1) 949-5454522 | 2r.se
4816 Seashore Drive, Newport Beach, CA 92663
This email is encrypted with 2ROT-13
Sent from my phone
On Oct 14, 2012 10:01 AM, "Penn Su" [email protected] wrote:
For some reason my right status bar always aborted with code 127
I'm running on lastet Mountain lion, installed the latest bash from brew,
and using zsh.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/65.
from tmux-powerline.
None of the segments are faulty, I took the entire status and run it with bash -x and nothing wrong showed up
If I don't put -x in bash, both status script prints successfully
from tmux-powerline.
When does it exit when status 127 then? When you run just ./status-right.sh
? Try uncomment some segments (or all and do a binary search).
from tmux-powerline.
Actually I think both status bar exit with 127 because the left status bar only shows a tiny segment painted with black and I opened up the source code for lib.sh which is responsible for printing both status bars and there it is, when the script doesn't evaluate, it will print [#default]
I have already comment out all segments, and without any segments there is no error, because nothing is executed, but if I leave any one up it will show me that segment script exited with 127
from tmux-powerline.
Hmm and still it works fine if you run the script straight from a terminal?
from tmux-powerline.
Yes, status bar and individual segments but not from tmux
from tmux-powerline.
Okay so what you're seeing is the output from line 52 https://github.com/erikw/tmux-powerline/blob/master/lib.sh#L52 I guess? I'm not on mac so I can't really dig in to the debugging my self.
from tmux-powerline.
Yes, it should be the output from line 52
from tmux-powerline.
I'm still confused, because I can't seem to fathom why tmux would produce a different output than running in the shell directly, since my new bash is in the path and it is the default one (version > 4.2.x).
But since I'm using zsh, I don't know if bash in tmux is not actually called from the latest version from homebrew?
from tmux-powerline.
Is the path to the new version of bash before the system default in the $PATH variable? Could you do echo $PATH
and paste the output? What you want is something like:
...:/usr/local/bin:/...:/bin:...
In order for the new version to be called, the path to where Brew installs programs (/usr/local/bin on my machine) should be before the path where the system's bash is installed (/bin on my machine).
from tmux-powerline.
The bug is in the cpu segment on OS X 10.8.2. When the cpu segment is manually run it fails. Disabling this segment in status-right.sh
causes the exit error to go away and for the right status line to print correctly.
$ ./cpu.sh
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
10.6, 6.7, 82.7
from tmux-powerline.
@meldanya yes, /usr/loca/bin is actually the first
@dylancopeland if I disable cpu.sh, it will say load.sh is returning 127 instead and it will do that until I disable all segments
from tmux-powerline.
guys, I think I found the error now, it wasn't appearing before, this is after I took all my export in my zshrc, so it is using the old bash now (version 3.2.48) and it has the asme 127 code
+++ echo $'./segments/load.shcolour167colour237227\200'
+ separator_fg=$'./segments/load.shcolour167colour237227\200'
++ $'./segments/load.shcolour167colour237227\200'
./lib.sh: line 49: ./segments/load.shcolour167colour237◀: No such file or directory
+ output=
+ local exit_code=127
+ '[' 127 -ne 0 ']'
+ echo 'Segment ./segments/load.shcolour167colour237◀ exited with code 127. Aborting.'
Segment ./segments/load.shcolour167colour237◀ exited with code 127. Aborting.
+ exit 1
No wonder it fails for every segment
Now I could confirm that even though I added the /usr/local/bin/ in my zshrc tmux is still using the old bash
from tmux-powerline.
Can you post the full debug output of status-right.sh here or some pasetbin?
from tmux-powerline.
Do you mean the output from the old bash? or the new bash? there were no errors when I run it in the new bash.
from tmux-powerline.
Maybe I miss understood you. Did you solve the problem by using a newer bash version?
from tmux-powerline.
oh wow, I don't know what I did to make it work again, but it seems like it is working except the arrows are a bit weird that's all.
I removed the -2 flag to launch tmux, but I think this is least likely to be the culprit
So it might be my path is messed up, I cleaned my path to not contain any duplicated path (I was including /usr/bin, /bin, /sbin, etc after /usr/local/bin). I just killed my tmux server and it seems to work now, weird
So I think for now I will close the issue, thanks all for the help :)
from tmux-powerline.
Alright :)
from tmux-powerline.
After a system update to Mountain Lion, I began experiencing this same problem. I played around with everything until I remembered this part of Prezto's Readme:
### Mac OS X
If you have administrator privileges, you must fix an Apple-introduced problem
in Mac OS X 10.5 Leopard by executing the following command, or BASH and Zsh
will have the wrong `PATH` when executed non-interactively.
sudo chmod ugo-x /usr/libexec/path_helper
`path_helper` is intended to make it easier for installers to add new paths to
the environment without having to edit shell configuration files by adding
a file with a path to the */etc/paths.d* directory.
Unfortunately, `path_helper` always reads paths from */etc/paths* set by Apple
then paths from */etc/paths.d* set by third party installers, and lastly paths
from the `PATH` environment variable set by the parent process, which
ultimately is set by the user with `export PATH=...` Thus, it reorders path
priorities, and user */bin* directories meant to override system */bin*
directories end up at the tail of the array.
Edit for clarification: I had already executed this when I first installed Prezto, but I believe the system update may have undid the changes (completely speculation).
This fixed my problem!
<3 tmux-powerline
from tmux-powerline.
Related Issues (20)
- LAN IP on Mac returns N/a despite script working as expected HOT 2
- Changing background color of the tmux window list HOT 2
- Powerline init not executed on first session creation HOT 1
- Wrong session_info in nested tmux session
- Support tmux-suspend in mode_indicator segment HOT 1
- powerline fails to start in termux HOT 1
- VCS segments not working for non-git repositories nested/down the path
- New segment vcs_rootpath
- New segment date_week
- New segment kubernetes_context
- Add dual-line status bar support HOT 2
- Status Justification always behaves as relatively centered HOT 1
- New segment vpn HOT 1
- vcs_rootpath shows backslash with tilde
- kubernetes_context add namespace information and display mode
- roll_text does currently only support filling up with empty space
- vcs_branch does not show correct branch for SVN repos if CWD!=rootpath
- Add support for untracked files in SVN to vcs_others.sh segment
- ifstat segment not supporting predictable network interface names
- vcs_others and vcs_modified output contains empty spaces on macOS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tmux-powerline.