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

mount -t completions fail on FreeBSD #3841

Closed
asomers opened this Issue Feb 11, 2017 · 1 comment

Comments

Projects
None yet
3 participants
@asomers
Contributor

asomers commented Feb 11, 2017

  • Have you checked if problem occurs with fish 2.5.0?
  • Tried fish without third-party customizations (check sh -c 'env HOME=$(mktemp -d) fish')?

fish version installed (fish --version):
2.5.0

OS/terminal used:
FreeBSD/any

Talk about the the issue here.
share/functions/__fish_print_filesystems.fish contains a Linuxism. The mount.* helpers are Linux specific. On FreeBSD, they're called mount_*, a convention that dates to 386BSD if not older.

Reproduction steps

  1. type "mount -t" and press tab.
  2. Various filesystems should be listed. Instead, an error appears.

No matches for wildcard '$PATH/mount.'.
/usr/local/share/fish/functions/__fish_print_filesystems.fish (line 1): string replace -ra ".
/mount." "" -- $PATH/mount.*
^
in command substitution
called on line 1 of file /usr/local/share/fish/functions/__fish_print_filesystems.fish

in function '__fish_print_filesystems'
called on standard input

in command substitution
called on standard input

For now, I've worked around the issue by patching that file in FreeBSD's build system. It's effective if inelegant, but the same bug likely affects other operating systems. It would be better to fix the bug here, but I can't find any other examples of fish function or completion files that get modified during the build.
Downstream bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216032

@krader1961

This comment has been minimized.

Show comment
Hide comment
@krader1961

krader1961 Feb 11, 2017

Contributor

I happened to be investigating a different problem on FreeBSD 12.0 when this was opened and can confirm this is a bug.

@asomers: We would love to see you submit a patch for review and merging. You're obviously someone who cares about making fish behave better on FreeBSD and we would love to see someone like yourself contributing FreeBSD platform specific improvements.

Contributor

krader1961 commented Feb 11, 2017

I happened to be investigating a different problem on FreeBSD 12.0 when this was opened and can confirm this is a bug.

@asomers: We would love to see you submit a patch for review and merging. You're obviously someone who cares about making fish behave better on FreeBSD and we would love to see someone like yourself contributing FreeBSD platform specific improvements.

@krader1961 krader1961 added this to the fish-future milestone Feb 11, 2017

asomers added a commit to asomers/fish-shell that referenced this issue Feb 12, 2017

Fix "mount -t" completions on non-Linux OSes
AFAICT Linux alone uses the "mount.XXX" convention for mount helpers.
Illumos, Irix, HPUX, OSX, and the BSDs all use "mount_XXX".  This commit
adds a configure-time check for which style of mount helper is
available.

Fixes fish-shell#3841

asomers added a commit to asomers/fish-shell that referenced this issue Feb 13, 2017

Fix "mount -t" completions on non-Linux OSes
AFAICT Linux alone uses the "mount.XXX" convention for mount helpers.
Illumos, Irix, HPUX, OSX, and the BSDs all use "mount_XXX".

Fixes issue fish-shell#3841

krader1961 added a commit that referenced this issue Feb 13, 2017

Fix "mount -t" completions on non-Linux OSes
AFAICT Linux alone uses the "mount.XXX" convention for mount helpers.
Illumos, Irix, HPUX, OSX, and the BSDs all use "mount_XXX".

Fixes issue #3841

@krader1961 krader1961 modified the milestones: 2.6.0, fish-future Feb 13, 2017

@krader1961 krader1961 closed this Feb 13, 2017

develop7 added a commit to develop7/fish-shell that referenced this issue Apr 17, 2017

Fix "mount -t" completions on non-Linux OSes
AFAICT Linux alone uses the "mount.XXX" convention for mount helpers.
Illumos, Irix, HPUX, OSX, and the BSDs all use "mount_XXX".

Fixes issue fish-shell#3841
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment