[SOLVED] How to disable broken file completion in csh?

Status
Not open for further replies.

Ishtar

Cadet
Joined
Sep 24, 2013
Messages
8
I'm an avid FreeBSD user. I love (t)csh as a user shell, it's great. However, in FreeNAS 9.3, it appears file completion (filec) is broken.

Let me demonstrate.

I create 3 test directories:
drwxr-xr-x 2 root wheel 2B Jan 24 12:21 This.is.A.Test/
drwxr-xr-x 2 root wheel 2B Jan 24 12:21 This.is.A.Test.Test/
drwxr-xr-x 2 root wheel 2B Jan 24 12:21 This.is.Another.Test/

I try to access one of the dirs by hitting <tab>:
root@freenas3:~/test # cd This.is.A. <tab>
This.is.A.Test.Test/ This.is.A.Test/ This.is.Another.Test/

On FreeBSD, using the same .cshrc and .profile, this problem does not exist. It will only list the two dirs matching "This.Is.A." but FreeNAS still lists "This.is.Another.Test". Copying the working FreeBSD .cshrc and .profile does not change the result.

Removing "set filec" or even changing it to "unset filec" does nothing.

This is super annoying when you have a lot of directories with similar names, namely date-structured. I always end up having to manually enter the full path.

Help?

Thanks
 

Ishtar

Cadet
Joined
Sep 24, 2013
Messages
8
Native Mac OpenSSH client. But I can replicate it from FreeBSD's OpenSSH client. Or Linux's OpenSSH client. 99.999% sure it's not the client.
 
D

dlavigne

Guest
Which build version (from System -> Information)? It works for me on latest STABLE from a FreeBSD system:

example.png
 

Ishtar

Cadet
Joined
Sep 24, 2013
Messages
8
FreeNAS-9.3-STABLE-201601181840 (just forced the latest updates).

I can replicate your success and my failure.

My failure:
[root@freenas] ~# mkdir this.is.a.test this.is.another.test this.is.a.test.2
[root@freenas] ~# cd this.is.a.
this.is.a.test.2/ this.is.a.test/ this.is.another.test/

Still shows the "another". Now your example:
[root@freenas] ~# mkdir test.1 test.2 test.3
[root@freenas] ~# cd test.
test.1/ test.2/ test.3/

Thanks
 
D

dlavigne

Guest
I wonder if it is the multiple dots? Alternately, are you using a different locale?
 

Linkman

Patron
Joined
Feb 19, 2015
Messages
219
Is it the trailing dot matching a character? The failing example is matching the leading "a" in another, and the dot is matching the "n", where the two that are expected are matching the dots?
 

rsquared

Explorer
Joined
Nov 17, 2015
Messages
81
Have you looked at 'man tcsh'? The following is from http://www.manpages.info/freebsd/tcsh.1.html


If the complete shell variable is set to `enhance', completion 1) ignores case and 2) considers periods, hyphens and underscores (`.', `-' and `_') to be word separators and hyphens and underscores to be equivalent. If you had the following files

comp.lang.c comp.lang.perl comp.std.c++ comp.lang.c++ comp.std.c

and typed `mail -f c.l.c[tab]', it would be completed to `mail -f comp.lang.c', and ^D would list `comp.lang.c' and `comp.lang.c++'. `mail -f c..c++[^D]' would list `comp.lang.c++' and `comp.std.c++'. Typing `rm a--file[^D]' in the following directory
 
Status
Not open for further replies.
Top