File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -872,7 +872,7 @@ impl Executor {
872
872
//カレントディレクトリを変更
873
873
"cd" => {
874
874
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) ) ;
876
876
}
877
877
}
878
878
@@ -888,13 +888,16 @@ impl Executor {
888
888
// ファイル一覧のリスト
889
889
"ls" => {
890
890
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
+ }
898
901
}
899
902
900
903
// コマンドとして認識されない場合は文字列とする
You can’t perform that action at this time.
0 commit comments