Skip to main content
added additional info
Source Link
Ali
  • 5.5k
  • 5
  • 22
  • 19

When I am trying to doTab path completion does not work (at least on Ubuntu and AFAIK Arch) with

sudo mount <whatever>

the tab completion doesThe iso file I am trying to mount is not workin (at least on Ubuntu and AFAIK Arch)/etc/fstab. If I just type

mount <whatever>

the completion works (but of course the command fails as I am not root). Apparently it is sudo that breaks it.

How can make completion work with sudo?

It is surprising that with

sudo umount <whatever>

completion works. How is it achieved? Does it look into /etc/fstab?

Solution: I just put a shell script into /usr/local/bin that calls sudo mount ... with the arguments passed to it. Completion works when calling this script since there is no sudo in the way.

When I am trying to do

sudo mount <whatever>

the tab completion does not work (at least on Ubuntu and AFAIK Arch). If I just type

mount <whatever>

the completion works (but of course the command fails as I am not root). Apparently it is sudo that breaks it.

How can make completion work with sudo?

It is surprising that with

sudo umount <whatever>

completion works. How is it achieved? Does it look into /etc/fstab?

Solution: I just put a shell script into /usr/local/bin that calls sudo mount ... with the arguments passed to it. Completion works when calling this script since there is no sudo in the way.

Tab path completion does not work (at least on Ubuntu and AFAIK Arch) with

sudo mount <whatever>

The iso file I am trying to mount is not in /etc/fstab. If I just type

mount <whatever>

the completion works (but of course the command fails as I am not root). Apparently it is sudo that breaks it.

How can make completion work with sudo?

It is surprising that with

sudo umount <whatever>

completion works. How is it achieved? Does it look into /etc/fstab?

Solution: I just put a shell script into /usr/local/bin that calls sudo mount ... with the arguments passed to it. Completion works when calling this script since there is no sudo in the way.

improved solution description
Source Link
Ali
  • 5.5k
  • 5
  • 22
  • 19

When I am trying to do

sudo mount <whatever>

the tab completion does not work (at least on Ubuntu and AFAIK Arch). If I just type

mount <whatever>

the completion works (but of course the command fails as I am not root). Apparently it is sudo that breaks it.

How can make completion work with sudo?

It is surprising that with

sudo umount <whatever>

completion works. How is it achieved? Does it look into /etc/fstab?

Solution: The problem can be solved by adding an additional layer of indirection since completion works if there is no sudo. I just put a shell script into /usr/local/bin that calls sudo mount ... with the arguments passed to it. Completion works when calling this script since there is no sudo in the way.

When I am trying to do

sudo mount <whatever>

the tab completion does not work (at least on Ubuntu and AFAIK Arch). If I just type

mount <whatever>

the completion works (but of course the command fails as I am not root). Apparently it is sudo that breaks it.

How can make completion work with sudo?

It is surprising that with

sudo umount <whatever>

completion works. How is it achieved? Does it look into /etc/fstab?

Solution: The problem can be solved by adding an additional layer of indirection since completion works if there is no sudo. I just put a shell script into /usr/local/bin that calls sudo mount ... with the arguments passed to it. Completion works when calling this script.

When I am trying to do

sudo mount <whatever>

the tab completion does not work (at least on Ubuntu and AFAIK Arch). If I just type

mount <whatever>

the completion works (but of course the command fails as I am not root). Apparently it is sudo that breaks it.

How can make completion work with sudo?

It is surprising that with

sudo umount <whatever>

completion works. How is it achieved? Does it look into /etc/fstab?

Solution: I just put a shell script into /usr/local/bin that calls sudo mount ... with the arguments passed to it. Completion works when calling this script since there is no sudo in the way.

solution added
Source Link
Ali
  • 5.5k
  • 5
  • 22
  • 19

When I am trying to do

sudo mount <whatever>

the tab completion does not work (at least on Ubuntu and AFAIK Arch). If I just type

mount <whatever>

the completion works (but of course the command fails as I am not root). Apparently it is sudo that breaks it.

How can make completion work with sudo?

It is surprising that with

sudo umount <whatever>

completion works. How is it achieved? Does it look into /etc/fstab?

Solution: The problem can be solved by adding an additional layer of indirection since completion works if there is no sudo. I just put a shell script into /usr/local/bin that calls sudo mount ... with the arguments passed to it. Completion works when calling this script.

When I am trying to do

sudo mount <whatever>

the tab completion does not work (at least on Ubuntu and AFAIK Arch). If I just type

mount <whatever>

the completion works (but of course the command fails as I am not root). Apparently it is sudo that breaks it.

How can make completion work with sudo?

It is surprising that with

sudo umount <whatever>

completion works. How is it achieved? Does it look into /etc/fstab?

When I am trying to do

sudo mount <whatever>

the tab completion does not work (at least on Ubuntu and AFAIK Arch). If I just type

mount <whatever>

the completion works (but of course the command fails as I am not root). Apparently it is sudo that breaks it.

How can make completion work with sudo?

It is surprising that with

sudo umount <whatever>

completion works. How is it achieved? Does it look into /etc/fstab?

Solution: The problem can be solved by adding an additional layer of indirection since completion works if there is no sudo. I just put a shell script into /usr/local/bin that calls sudo mount ... with the arguments passed to it. Completion works when calling this script.

improved question
Source Link
Ali
  • 5.5k
  • 5
  • 22
  • 19
Loading
Source Link
Ali
  • 5.5k
  • 5
  • 22
  • 19
Loading