ソースを参照

feat(phoenix): Show actual host name in prompt and neofetch

Sam Atkins 11 ヶ月 前
コミット
4539408a21

+ 1 - 1
packages/phoenix/src/ansi-shell/ANSIShell.js

@@ -95,7 +95,7 @@ export class ANSIShell extends EventTarget {
         })
 
         this.export_('LANG', 'en_US.UTF-8');
-        this.export_('PS1', '[\\u@puter.com \\w]\\$ ');
+        this.export_('PS1', '[\\u@\\h \\w]\\$ ');
 
         for ( const k in env.getEnv() ) {
             console.log('setting', k, env.get(k));

+ 1 - 1
packages/phoenix/src/platform/puter/env.js

@@ -4,7 +4,7 @@ export const CreateEnvProvider = ({ config }) => {
             return {
                 USER: config['puter.auth.username'],
                 HOME: '/' + config['puter.auth.username'],
-                HOSTNAME: 'puter.com',
+                HOSTNAME: config['puter.domain'],
             }
         },
 

+ 1 - 1
packages/phoenix/src/puter-shell/coreutils/neofetch.js

@@ -70,7 +70,7 @@ export default {
         }
         
         lines[0] += COL + ctx.env.USER + END + '@' +
-            COL + 'puter.com' + END;
+            COL + ctx.env.HOSTNAME + END;
         lines[1] += '-----------------';
         lines[2] += COL + 'OS' + END + ': Puter'
         lines[3] += COL + 'Shell' + END + ': Puter Shell v' + SHELL_VERSIONS[0].v