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