                 return false
             }
             
-            // default(auto):
+            // auto:
+            do {
+                let terminalType = try terminalType();
+                
+                switch terminalType {
+                case .file:
+                    return false
+                case .dumb:
+                    return false // dumb terminals don't interpret escape sequences
+                case .tty:
+                    break // keep guessing
+                }
+
+                // TODO: detect pipe and -> no-color
+            } catch { // TODO: catch specific error
+            }
+            
             if Self.env["TERM"] == "xterm-256color" {
                 return true
             }
-                
-            do {
-                if try terminalType() == .file {
-                    return false
-                }
-                
-                // TODO: pipe -> no-color
-                // TODO: tty -> keep guessing
-    //            if isatty()
-                
-                return false
-            } catch {
-                return false
-            }
+            
+            return false
         }()
         
         self.verbose = verboseCommandLineFlag

        silence = silenceModeCommandLineFlag
        
        colored = {
            // precede commandline
            if noColorCommandLineFlag {
                return false
            }

    // FILEPointer(aka UnsafeMutablePointer<FILE>)はCのFILE*と同じと仮定
    // fdopenで fileDescriptorから filePointerを作り、
    // FILEPointerからLocalFileOutputByteStream を作り、terminalTypeを取得
    let stdOutFileDescriptor: Int32 = {
        if #available(macOS 11,*) {
            return FileDescriptor.standardOutput.rawValue as Int32
        } else {
