Skip to content
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

Doesn't work on Mac #2

Open
wdane opened this issue Oct 13, 2014 · 5 comments
Open

Doesn't work on Mac #2

wdane opened this issue Oct 13, 2014 · 5 comments

Comments

@wdane
Copy link

wdane commented Oct 13, 2014

I'm using a bash shell on mac (GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13)), and when I try to source the .sh I get "Sorry, only bash and zsh are supported."

Should this be OS agnostic?

@swirepe
Copy link
Owner

swirepe commented Oct 14, 2014

Hmm, that's really interesting; I think I originally developed this on a mac. What is the output when you echo $SHELL?

@swirepe
Copy link
Owner

swirepe commented Oct 14, 2014

Ah, now I remember. I got halfway through implementing the zsh stuff and stopped, so that might be what is broken about it. Sorry about that. In the meantime, you can try the stuff from a commit backwards: https://github.com/swirepe/alwaysontop/blob/3ec77efc4204d8be51e3fd5a01d56e44826401b8/alwaysontop.sh

@wdane
Copy link
Author

wdane commented Oct 14, 2014

Interesting... I tried using that commit, but get the following error (and it doesn't move things on top) on any command I run after sourcing it.

-bash: PROMPT_COMMAND: line 38: syntax error near unexpected token ;' -bash: PROMPT_COMMAND: line 38:find_git_branch; find_git_dirty; update_terminal_cwd; ; tput cup 0 0 ; tput el ; tput el1'

I couldn't find any of the commands preceding tput cup 0 0 and I tried removing the semicolon before tput but that didn't seem to do the trick. I'd like to look into it more, but I'm pretty unfamiliar with bash scripting.

@swirepe
Copy link
Owner

swirepe commented Oct 15, 2014

That's weird. Can you show me what echo $PROMPT_COMMAND says? It looks like yours ends with a semicolon, so you had the right idea removing it from that tput line. I'm still confused about why that doesn't work.

@wdane
Copy link
Author

wdane commented Oct 15, 2014

The echo is find_git_branch; find_git_dirty; update_terminal_cwd; ; tput cup 0 0 ; tput el ; tput el1

and if I remove the semi colon in the code to make it
PROMPT_COMMAND="$PROMPT_COMMAND tput cup 0 0 ; tput el ; tput el1"

echo prints the same thing. (I made sure to resource it).

Odd

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