2010-11-30 4 views
2

ここは奇妙です。 Windows VistaでのCygwinのbash上 emacsシェルで実行されているunix date utilの問題

、私はこのような日付を取得することができます:任意の

c:\Users\xah\web\xahlee_org\comp>which date 
which date 
/usr/bin/date 

c:\Users\xah\web\xahlee_org\comp>date 
date 
The current date is: 2010-11-30 
Enter the new date: (yy-mm-dd) 


c:\Users\xah\web\xahlee_org\comp>date +%s 
date +%s 
The system cannot accept the date entered. 
Enter the new date: (yy-mm-dd) 

$ date 
2010-11-30 4:40:48 AM PST 

[email protected] ~ 
$ date +%s 
1291120855 

が、「シェル」のemacs、同じ日付のコマンドを実行するには、私はこの取得します何が起こっているのか?

答えて

5

これは、emacsシェルが実際にはWindowsコマンドプロンプトシェルであり、dateコマンドが送られて失敗するためです。

あなたの代わりにCygwinのbashシェルを使用するようにEmacsを設定することができます方法を見つけるためにこの質問を見てみましょう:

How can I run Cygwin Bash Shell from within Emacs?

2

あなたが好きでは決してないのcmd.exeの日付の組み込みを、ヒットしていますPOSIX日付(1)。これを回避するには、必要な日付コマンドの完全なパスを入力します。

関連する問題