mirror of
https://github.com/voideditor/void
synced 2026-05-23 17:38:23 +00:00
identify more shells
This commit is contained in:
parent
e8b7c9c470
commit
3fa680e8ba
1 changed files with 16 additions and 1 deletions
|
|
@ -239,6 +239,21 @@ export const StatusIndicatorForApplyButton = ({ applyBoxId, uri }: { applyBoxId:
|
|||
}
|
||||
|
||||
|
||||
const terminalLanguages = new Set([
|
||||
'bash',
|
||||
'shellscript',
|
||||
'shell',
|
||||
'powershell',
|
||||
'bat',
|
||||
'zsh',
|
||||
'sh',
|
||||
'fish',
|
||||
'nushell',
|
||||
'ksh',
|
||||
'xonsh',
|
||||
'elvish',
|
||||
])
|
||||
|
||||
export const ApplyButtonsHTML = ({
|
||||
codeStr,
|
||||
applyBoxId,
|
||||
|
|
@ -261,7 +276,7 @@ export const ApplyButtonsHTML = ({
|
|||
|
||||
const { currStreamStateRef, setApplying } = useApplyStreamState({ applyBoxId })
|
||||
|
||||
const isShellLanguage = language === 'bash' || language === 'shellscript'
|
||||
const isShellLanguage = !!language && terminalLanguages.has(language)
|
||||
|
||||
const [isShellRunning, setIsShellRunning] = useState<boolean>(false)
|
||||
const interruptToolRef = useRef<(() => void) | null>(null)
|
||||
|
|
|
|||
Loading…
Reference in a new issue