Skip to content

Commit

Permalink
fix(#36): add openDefaultShell class method to TerminalEmulator, worl…
Browse files Browse the repository at this point in the history
…d menu now opend a shell based on the value of the SHELL environment variable
  • Loading branch information
Dany authored and lxsang committed Oct 24, 2023
1 parent c452c5d commit c139ccf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion PTerm-UI/TerminalEmulator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ TerminalEmulator class >> menuCommandOn: aBuilder [
parent: #'SystemTools';
keyText: 'o, c';
help: 'Terminal';
action: [ self openBash ].
action: [ self openDefaultShell ].

]

Expand All @@ -171,6 +171,12 @@ TerminalEmulator class >> openBash [

]

{ #category : #'instance creation' }
TerminalEmulator class >> openDefaultShell [
^self open: (OSEnvironment current at: 'SHELL' ifAbsent: [ '/bin/sh' ]) arguments: #()

]

{ #category : #'instance creation' }
TerminalEmulator class >> openPTY: fd [
"Open terminal emulator window given an open PTY master file descriptor.
Expand Down

0 comments on commit c139ccf

Please sign in to comment.