Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Apr 2021 13:54:41 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 254789] Tab completion acts differently in sh than csh when a directory name contains a space
Message-ID:  <bug-254789-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D254789

            Bug ID: 254789
           Summary: Tab completion acts differently in sh than csh when a
                    directory name contains a space
           Product: Base System
           Version: Unspecified
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: misc
          Assignee: bugs@FreeBSD.org
          Reporter: doctorwhoguy@gmail.com

I first noticed this issue while using FreeBSD 13-RC4. It is still present =
in
RC5. However because the bug is kind of subtle, it's possible it's been the=
re a
while and I just never noticed it. In any case, the behavior I expect from =
tab
completion in the terminal is that a tab will complete a filename and enter=
 a
space automatically after the filename, but if tab completion fills out a
directory name, it will put a forward slash after the directory name with no
space. This is useful because an additional tab can be used to fill out
additional elements in a path.

However, I noticed that if a directory name contains a space, a tab will
complete the directory name and automatically put a space at the end with no
forward slash. In other words, it treats a directory name with a space the =
same
as it treats a filename. This is annoying when trying to use tab to complet=
e a
path name with multiple elements because it requires a backspace and a forw=
ard
slash before using tab again.

But this bug only affects regular users and not root. Apparently this is
because regular users use sh by default while root uses csh by default. If I
type "csh" at the command line as a regular user to open a new shell, I get=
 the
expected behavior back. Also, even in sh, if a path name is prepended with
double quotes, a tab will fill in a forward slash and no space at the end e=
ven
when a space exists in a directory name. So this is currently the workaroun=
d.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-254789-227>