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

need a symbolic link to the manual of the used version to support update-alternatives #168

Open
pjgoodall opened this issue Nov 20, 2023 · 12 comments

Comments

@pjgoodall
Copy link

Amongst the Debians, when setting update-alternatives the --slave parameter can't be set in a way that isn't broken when bob use xx changes the version of nvim. If we had a man1 directory under ~/.local/share/bob, it would all work nicely.

see baeldung - update-alternatives command

And - thanks very much for your very useful utility - nvim under Ubuntu is a mess...

@MordechaiHadad
Copy link
Owner

Still not very sure what I am supposed to do with this man1 dir

@MordechaiHadad
Copy link
Owner

🤔

@pjgoodall
Copy link
Author

I leave where you put the manual file up to you. You may know better than me. But for bob to install a new version of nvim and its manual, and for them to be useful with update-alternatives, they need to be linked to a stable location. I thought a man directory would be conventional. The manuals for vim seem to find themselves in /usr/share/man1
The tutorial i linked to explains how the --slave option uses the man location. If I use your current place for the man, I will have to relink --slave every time I used bob to change the version of nvim.

I don't know what else to say. Except thanks for your time, and the excellent utility.

@MordechaiHadad
Copy link
Owner

So what u are asking me is basically, copy nvim's man1 to a designated path every time you switch versions?

@pjgoodall
Copy link
Author

pjgoodall commented Dec 1, 2023 via email

@MordechaiHadad
Copy link
Owner

test #174 via one of the provided artifacts before i merge this

@MordechaiHadad
Copy link
Owner

@pjgoodall is this still relevant?

@pjgoodall
Copy link
Author

@MordechaiHadad
My apologies. I’ll check it asap.
Many thanks.

@pjgoodall
Copy link
Author

pjgoodall commented Mar 28, 2024

@MordechaiHadad

man nvim does not work after bob use latest, and adding bob/nvim-bin in .zshrc to the path - this is independent of the update-alternatives mechanism.

I tried testing against

cargo install --branch feat/man-copying --git https://github.com/MordechaiHadad/bob.git

again. I did not detect any difference. Did I try the right install?

Maybe there needs to be a script , or an init inclusion in the .zshrc
There seem to be a lot of initialization scripts about (from my .zshrc):

source $OH_MY_ZSH/oh-my-zsh.sh
  source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
source ${ZPLUG_HOME}/init.zsh
# Then, source plugins and add commands to $PATH
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
source ${ZSH_ALIAS_FILE}
source ${XDG_CONFIG_HOME}/broot/launcher/bash/br
[ -f "${HOME}/.ghcup/env" ] && source "${HOME}/.ghcup/env" # ghcup-env
source ${XDG_CONFIG_HOME}/broot/launcher/bash/br
source <(jj util completion zsh)
 source ${XDG_CONFIG_HOME}/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

I'm sorry I can't help with the work - I've never programmed in rust.

Cheers...

@MordechaiHadad
Copy link
Owner

What was the message you got from running bob use latest?

@pjgoodall
Copy link
Author

pjgoodall commented Apr 2, 2024

The target system:

bob-nvim% lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 12 (bookworm)
Release:	12
Codename:	bookworm

I used the command-line to install:

cargo git https://github.com/MordechaiHadad/bob.git#feat\/man-copying
/home/peterg/.cargo/bin/bob
bob-nvim% bob --version
bob-nvim 2.8.3
bob-nvim% bob use latest
Apr 02 02:42:48.554  INFO Fetching latest version
Downloaded version v0.9.5 to /home/peterg/.local/share/bob/v0.9.5.appimage
  [00:00:01] [███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████] 10.66MiB/10.66MiB (6.00MiB/s, 0s)
Apr 02 02:42:51.939  INFO You can now use v0.9.5!

The manual file is in the version's directory, but not with a stable link:

bob-nvim% fd -H nvim.1 /
/home/peterg/.local/share/bob/v0.9.5/nvim-linux64/man/man1/nvim.1

@MordechaiHadad
Copy link
Owner

It seems like you need to add enable_manpage_mirror to your bob config and set it to true

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