/bin/sh adds additional space at the end for directories with spaces

ramib

Dabbler
Joined
Dec 31, 2019
Messages
41
Hi,

I have noticed that when using the default shell /bin/sh when user is created I cannot do this for example

using the tab to complete, it adds a space to the end

For example:

Screenshot 2020-12-11 at 12.24.42.png

The problem from this that I cannot copy/move anything using the TAB, the shell doesn't find it
For Example:

Screenshot 2020-12-11 at 12.25.51.png


Is this a know issue?
this happens with every folder with spaces in the name (and I dont have a space at the end go the name)
I didn't notices that I use /bin/sh since I always use csh which is working fine and this issue is not there

Thanks
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Is this a know issue?
I don't think so.

I just did a test and can get tab completion to work on a directory with spaces and it does not add a space at the end.

TrueNAS 12.0-U1
 

ramib

Dabbler
Joined
Dec 31, 2019
Messages
41
I don't think so.

I just did a test and can get tab completion to work on a directory with spaces and it does not add a space at the end.

TrueNAS 12.0-U1

I am on TrueNAS-12.0-STABLE but dont think the /bin/sh is different

-r-xr-xr-x 1 root wheel 161368 Dec 7 23:44 /bin/sh

are you sure you are on /bin/sh and not other shell?

Thanks
 

ramib

Dabbler
Joined
Dec 31, 2019
Messages
41
The issue is only on the TrueNAS , when using /bin/sh inside a jail where /bin/sh is newer the issue is not there
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
OK, so apparently I was in the new default zsh.

In sh, I get the trailing space, but can get tab completes.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Same in a 12.2 RELEASE jail.
 

ramib

Dabbler
Joined
Dec 31, 2019
Messages
41
OK, so apparently I was in the new default zsh.

In sh, I get the trailing space, but can get tab completes.

Its possible to tab for completion (assuming you see additional space) , the problem is not the chdir , its coping/moving to this location with or without tab
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I note that in the screenshot example you gave for cp, you have a syntax error.

you tried ... The\ Boys \Se <TAB>

Instead of ... The\ Boys\ Se <TAB>
 

ramib

Dabbler
Joined
Dec 31, 2019
Messages
41
I note that in the screenshot example you gave for cp, you have a syntax error.

you tried ... The\ Boys \Se <TAB>

Instead of ... The\ Boys\ Se <TAB>

No, that's the TAB that completes, I didn't type it

Screenshot 2020-12-11 at 13.53.32.png


try to copy a file and see (when /bin/sh)
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
It seems to me that I can't replicate your problem.

Tab completes and cp works as expected for me.
 

ramib

Dabbler
Joined
Dec 31, 2019
Messages
41
It seems to me that I can't replicate your problem.

Tab completes and cp works as expected for me.

strange , I just installed under fusion and the same issue out of the box (this is with tab completion)
doesn't matter I anyway don't use /bin/sh

Screenshot 2020-12-11 at 14.42.56.png
 
Top