Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cd using inodes?



Jean-Christian Imbeault wrote:

> >Did you try just using shell filename completion. That's a more normal way 
> >of doing it.
> 
> Yes, but it doesn't work. At least not with bash completion. I think this is 
> the filenames bash "sees" are in EUC where as an "ls" sees control 
> characters.

There shouldn't be any control characters in an EUC filename except if
you explicitly included some in it's name. (IIRC, I didn't verify this)

> That would be nice if I could do it but it seems the files all start with 
> "M"? And that's not a control char. If I try 'ls M[tab]' I don't get 
> filename completion.

I rather assume "cat -v"'s notation does mean you have to press
Meta-Control-x to get this character if it shows M-^X .
At least the manpage states:
       -v, --show-nonprinting
              use ^ and M- notation, except for LFD and TAB

If you set your locale to en_US, which uses the iso-8859-1 charset, you
should see all characters without special ls options
(except if there are control characters in the filename):

|ranma@example.com:~/mp3/jpop$ locale
|LANG=en_US
|LC_CTYPE="en_US"
|LC_NUMERIC="en_US"
|LC_TIME="en_US"
|LC_COLLATE="en_US"
|LC_MONETARY="en_US"
|LC_MESSAGES="en_US"
|LC_PAPER="en_US"
|LC_NAME="en_US"
|LC_ADDRESS="en_US"
|LC_TELEPHONE="en_US"
|LC_MEASUREMENT="en_US"
|LC_IDENTIFICATION="en_US"
|LC_ALL=
|ranma@example.com:~/mp3/jpop$ ls
|[...]
|��������ҡ�Ide Mariko            �ѷ�ꤵ��Mizuki Arisa
|ƣ��եߥ䡡Fujii Fumiya          ����������Imai Miki
|����� Aikawa Nanase            ����ζ�졡Sakamoto Ryuichi
|����Τ�ڡ�Aiuchi Rina             ����±���Sakaguchi��Mio
|����ɴ�á�Shimano Momoe           �����ҥǥ� Kaji Hideki
|����͵�ҡ�Arai Yuko               �֥꡼��&�ȥ�󥯥�
|�椺 Yuzu                         ����ȥ꡼̼�� Country Musume
|�椺��Yuzu                        ���Ҥ��ߡ�Go Hiromi
|[...]

Filename completion is however rather useless in this case if there are
no characters you can type. An example that works:

|ranma@example.com:~/mp3/jpop$ cd *Mariko
|ranma@example.com:~/mp3/jpop/��������ҡ�Ide Mariko$ cd ..

cut and paste should work without problems, too.

|ranma@example.com:~/mp3/jpop$ cd "����� Aikawa Nanase"
|ranma@example.com:~/mp3/jpop/����� Aikawa Nanase$ cd ..

Here I did copy the filename from the window I'm writing this in,
of course it has to be quoted, it maybe even better to use single
quotes, just in case there's a backslash in it...

-- 
Tobias								PGP: 0x9AC7E0BC
Hannover Fantreffen ML: mailto:fantreffen-request@example.comsubject=subscribe
Manga & Anime Treff Hannover: http://www.mantrha.de/


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links