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

Q: is it possible to use update-alternatives with bob? #150

Closed
rsb177 opened this issue Jul 31, 2023 · 7 comments
Closed

Q: is it possible to use update-alternatives with bob? #150

rsb177 opened this issue Jul 31, 2023 · 7 comments

Comments

@rsb177
Copy link

rsb177 commented Jul 31, 2023

Normally, i change my default editor via update-alternatives to neovim. I decided to try using bob to manage neovim for me, but when I tried setting vi to the nvim executable from bob, it acts like I just ran bob instead. Is there a way to do this via update-alternatives, or should i just alias instead?

@MordechaiHadad
Copy link
Owner

I have no idea what's update-alternatives

@rsb177
Copy link
Author

rsb177 commented Aug 1, 2023

basically, a way to manage things like which editor I want to use when I type vi.
Man Page
Overview

@MordechaiHadad
Copy link
Owner

I see, can you show me how you set it up?
Bob uses a proxy executable, if you rename bob to nvim it will execute neovim rather than bob.

@rsb177
Copy link
Author

rsb177 commented Aug 2, 2023

I just ran sudo update-alternatives --install /usr/bin/vi vi /home/rsb177/.local/share/bob/nvim-bin/nvim 100. It looks like since it's a proxy executable, if I set up a symbolic link to it (as any name other than nvim), it'll always run bob. Was able to replicate this by just using simple symbolic links. So it looks like I'll need to stick with just using aliases if I want to use nvim for commands like vi, view, etc.

@MordechaiHadad
Copy link
Owner

@rsb177 what name does the update-alternatives gives the executable?

@rsb177
Copy link
Author

rsb177 commented Aug 3, 2023

in the case of the command above, it shows up as vi

@MordechaiHadad
Copy link
Owner

oh, I guess you will have to alias it as you suggested :(
due to bob using proxy to execute nvim.

@rsb177 rsb177 closed this as completed Aug 17, 2023
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