FS#57711 - [util-linux] Bash completion failes for umount

Attached to Project: Arch Linux
Opened by Martin (greencopper) - Saturday, 03 March 2018, 18:34 GMT
Last edited by Doug Newgard (Scimmia) - Wednesday, 07 March 2018, 20:00 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Dave Reisner (falconindy)
Christian Hesse (eworm)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Bash completion for umount no longer works in the terminal.

This bug report for Debian is identical:

Additional info: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=852402

It used to work on Arch. After an upgrade some time back (2017) it isn't working any longer.

Package: bash-completion 2.7-2

Steps to reproduce:

Use the terminal to mount an external source like an USB drive or a NFS/SMB source. Then try to umount with tab completion.

It doesn't matter if the user is a normal user or root.

Kind regards
This task depends upon

Closed by  Doug Newgard (Scimmia)
Wednesday, 07 March 2018, 20:00 GMT
Reason for closing:  Not a bug
Comment by Doug Newgard (Scimmia) - Sunday, 04 March 2018, 14:45 GMT
bash-completion has nothing to do with this, util-linux has it's own completion files. Seems to work fine for options, you're complaining that it doesn't complete paths?

Edit: works fine for me for paths, too. What's the issue here, exactly?
Comment by Martin (greencopper) - Monday, 05 March 2018, 00:57 GMT
What works for you with paths too exactly?

If you do:

# umount /mnt/foo

Can you auto complete the path by pressing TAB at /mnt?

I cannot. I have tested on 3 different boxes all running Arch. 2 x64 and 1 Arm.

It used to be possible. util-linux is installed.

If this isn't bash-completion, then what?
Comment by Doug Newgard (Scimmia) - Monday, 05 March 2018, 01:23 GMT
I just tried it on a flash drive that was mounted with udisks2. Completion works fine.

As I said, the completion files are included with util-linux, the bash-completion package does nothing here.

Edit: Do you have more than one thing mounted at /mnt? If so, does hitting tab twice display your options?
Comment by Doug Newgard (Scimmia) - Monday, 05 March 2018, 01:42 GMT
OK, it's not working without bash-completion. Not sure what's going on with that.
Comment by Doug Newgard (Scimmia) - Monday, 05 March 2018, 17:34 GMT
So bash has no programmable completions without the bash-completion package. I've been using zsh for too long.

My question stands, what are you actually seeing?
Comment by Doug Newgard (Scimmia) - Wednesday, 07 March 2018, 14:41 GMT
Ping?
Comment by Martin (greencopper) - Wednesday, 07 March 2018, 19:42 GMT
Sorry for the delay!

I have just found the problem. The full path needs to be given.

In fstab I have:

//fooserver/disk1 /home/green/mnt/fooserver/disk1 cifs noauto,user,username=green,rw 0 0

So as normal user I do:

$ mount mnt/fooserver/disk1

Then normally I could do:

$ umount m + TAB

And the path would display. Now I just get:

$ umount mqueue

Where "mqueue" gets inserted when pressing m + TAB.

However, if I do:

$ umount /h + TAB

Becomes:

$ umount /home/green/mnt/fooserver/disk1

Then it works and the full path gets inserted.

I don't know if this is the desired result, but it used to work without the full path.

If it's the desired result, then all is working perfectly.

Thank you for your time.

Loading...