File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -872,7 +872,7 @@ impl Executor {
872872 //カレントディレクトリを変更
873873 "cd" => {
874874 if let Err ( err) = std:: env:: set_current_dir ( self . pop_stack ( ) . get_string ( ) ) {
875- self . log_print ( format ! ( "エラー! {}" , err) ) ;
875+ self . log_print ( format ! ( "エラー! {}\n " , err) ) ;
876876 }
877877 }
878878
@@ -888,13 +888,16 @@ impl Executor {
888888 // ファイル一覧のリスト
889889 "ls" => {
890890 if let Ok ( entries) = fs:: read_dir ( "." ) {
891- let value: Vec < Type > = entries
892- . filter_map ( |entry| {
893- entry. ok ( ) . and_then ( |e| e. file_name ( ) . into_string ( ) . ok ( ) ) . map ( |x| Type :: String ( x) )
894- } )
895- . collect ( ) ;
896- self . stack . push ( Type :: List ( value) ) ;
897- }
891+ let value: Vec < Type > = entries
892+ . filter_map ( |entry| {
893+ entry
894+ . ok ( )
895+ . and_then ( |e| e. file_name ( ) . into_string ( ) . ok ( ) )
896+ . map ( |x| Type :: String ( x) )
897+ } )
898+ . collect ( ) ;
899+ self . stack . push ( Type :: List ( value) ) ;
900+ }
898901 }
899902
900903 // コマンドとして認識されない場合は文字列とする
You can’t perform that action at this time.
0 commit comments