Skip to content

Add a fish shell startup script #446

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

Merged
merged 2 commits into from
Mar 25, 2020

Conversation

nuxeh
Copy link
Contributor

@nuxeh nuxeh commented Mar 18, 2020

This adds the subrepo command, but adding to the MANPATH variable in fish seems to cause manpages to not work for other things, from anecdotal evidence. Bash completion clearly doesn't work, but is something that could be done for fish shell at a later point, as fish shell completion definitions.

Since most of subrepo is executed explicitly with bash, it seems to work fine in fish shell as far as I can tell, besides the need for a fish rc file, as added in this commit.

@admorgan
Copy link
Collaborator

I noticed there are some subtle differences between this and #284 can you look at them and update this one if there are any benefits to what they were using. I don't know fish, or have an ability to test it so I will have to take your word for the fact that it works.

@admorgan
Copy link
Collaborator

Could you also rebase it on release/0.4.2?

nuxeh added 2 commits March 19, 2020 21:29
This adds the subrepo command, but adding to the MANPATH variable in
fish seems to cause manpages to not work for other things, from
anecdotal evidence. Bash completion clearly doesn't work, but is
something that could be done for fish shell at a later point, as fish
shell completion definitions.

Since most of subrepo is executed explicitly with bash, it seems to work
fine in fish shell as far as I can tell, besides the need for a fish rc
file, as added in this commit.
This adds the manual page path for the git-subrepo man page when using
the fish startup script for git subrepo.

This is a not uncontentious issue it seems, in fish shell, see:
fish-shell/fish-shell#2090

This however seems to be the suggested solution, and appears to work
well, with the man page working along with system manpages, and
`manpage` command producing a reasonable result.
@nuxeh nuxeh force-pushed the nuxeh/add-fish-rc branch from f93f3c8 to f9819d0 Compare March 19, 2020 16:38
@nuxeh
Copy link
Contributor Author

nuxeh commented Mar 19, 2020

Sure, rebased. Here the fish rc script uses a slightly different command to get the current directory the script is run in (i.e. the git-subrepo install directory), but otherwise the two are equivalent as far as I can tell. I just followed, as far as I could, guidelines I could find on how to update PATH and MANPATH. Works for me, at least.

@admorgan
Copy link
Collaborator

I am not sure what happened, but it looks like github doesn't think it is pointing at the correct branch.

@nuxeh nuxeh changed the base branch from master to release/0.4.2 March 20, 2020 03:10
@nuxeh
Copy link
Contributor Author

nuxeh commented Mar 20, 2020

Yes, good point, just changed the base on Github.

@nuxeh
Copy link
Contributor Author

nuxeh commented Mar 20, 2020

As to whether there is anything in the previous PR which would be beneficial, the only thing is the extra parameters to the set command, which doesn't seem to be required at least on recent fish on Linux. Also, the previous PR's method of updating MANPATH won't work correctly, as far as I know.

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

Successfully merging this pull request may close these issues.

2 participants