@@ -77,6 +77,7 @@ define(function (require, exports, module) {
7777 let terminalInstances = [ ] ; // All terminal instances
7878 let activeTerminalId = null ; // Currently visible terminal
7979 let processInfo = { } ; // id -> processName from PTY
80+ let originalDefaultShellName = null ; // System-detected default shell name
8081 let $panel , $contentArea , $shellDropdown , $flyoutList ;
8182
8283 /**
@@ -158,11 +159,13 @@ define(function (require, exports, module) {
158159 }
159160
160161 /**
161- * Update the "+ New Terminal" button label to show the default shell name
162+ * Update the "+ New Terminal" button label.
163+ * Shows "Terminal" when using the system default, or the shell name when user switched.
162164 */
163165 function _updateNewTerminalButtonLabel ( ) {
164166 const defaultShell = ShellProfiles . getDefaultShell ( ) ;
165- const label = defaultShell ? defaultShell . name : "New Terminal" ;
167+ const isOriginal = defaultShell && defaultShell . name === originalDefaultShellName ;
168+ const label = ! defaultShell || isOriginal ? "Terminal" : defaultShell . name ;
166169 $panel . find ( ".terminal-new-btn-label" ) . text ( label ) ;
167170 $panel . find ( ".terminal-flyout-new-btn" ) . attr ( "title" , label ) ;
168171 }
@@ -561,6 +564,8 @@ define(function (require, exports, module) {
561564 // Detect shells
562565 ShellProfiles . init ( nodeConnector ) . then ( function ( ) {
563566 const shells = ShellProfiles . getShells ( ) ;
567+ const systemDefault = ShellProfiles . getDefaultShell ( ) ;
568+ originalDefaultShellName = systemDefault ? systemDefault . name : null ;
564569 if ( shells . length <= 1 ) {
565570 $panel . find ( ".terminal-flyout-dropdown-btn" ) . addClass ( "forced-hidden" ) ;
566571 }
0 commit comments