未来の自分へのメモ
ネット越しにrsyncでファイルコピーをしたところ、
`tty`: Ambiguous
というメッセージが出てきました。別の環境では出たことが無く原因が判りませんでした。
It is not a strange message and csh is documented to behave that way…
The problem is that in your .cshrc you have something that tries to
execute `tty`. If you are not running the shell on a real tty then
tty will print “not a tty”. Csh expects one word in some places,
but tty is giving it back 3.The solution is to add a pair of quotes around `tty` to make it a single
word:
だそうです。
確かにcshを使っていて、.cshrcに
switch ( `tty` ) case /dev/console: case /dev/ttyv[0-9]: setenv LC_CTYPE C setenv LANG C breaksw default: setenv LC_CTYPE ja_JP.UTF-8 setenv LANG ja_JP.UTF-8 breaksw endsw
このような記述をしてました。この中の `tty`の部分をダブルクォーテーションで囲むと良いそうです。
switch ( "`tty`" ) case /dev/console: case /dev/ttyv[0-9]: setenv LC_CTYPE C setenv LANG C breaksw default: setenv LC_CTYPE ja_JP.UTF-8 setenv LANG ja_JP.UTF-8 breaksw endsw
これで `tty`: Ambiguous. は出なくなりました。