mirror of
https://github.com/microsoft/terminal.git
synced 2026-09-25 00:15:10 +00:00
cmd: add environment variable to disable/enable 'Terminate batch job (Y/N)?' confirmation #319
Open
opened 2026-01-30 21:48:43 +00:00 by claunia
·
70 comments
No Branch/Tag Specified
main
dev/duhowett/stop-using-projection-for-control-innards
dev/duhowett/fhl-2026/remove-paste-hairpin-handler
dev/duhowett/win7-wpf-termcontrol-squash
dev/lhecker/20226-present-leaks
dev/duhowett/wpf-1-autoscroll-to-interactivity
dev/duhowett/wpf-3-swapchain-handle
dev/duhowett/wpf-2-midi-audio-timer
dev/migrie/overview-for-pr
dev/migrie/b/markdown-paste
dev/duhowett/padding-in-atlas
fix/german-split-pane-tooltip
release-1.25
dev/cazamor/sui-rejuv/fix-spaces
dev/migrie/per-window-final
dev/cazamor/selfhost/2026-08-31
dev/migrie/b/independent-animations
dev/pabhoj/wtcli
dev/cazamor/conhost/bugfix-a11y-find
dev/cazamor/conhost/bugfix-a11y-find-1.24
dev/lhecker/theme-quality-test
dev/lhecker/theme-quality
dev/cazamor/selfhost/sui-rejuv
dev/cazamor/fix/search-selection-off-by-one
dev/duhowett/even-more-builtin-glyphs
dev/crutkas/kitty-pr1
dev/cazamor/toast/activity
release-1.24
users/GitHubPolicyService/d8615b98-f5fa-4462-bf7f-c44a1cc12096
dev/cazamor/selfhost/2026-06-18
dev/migrie/f/new-profile-subcommand
dev/cazamor/sui-rejuv/profiles-v2
dev/duhowett/asan-for-all
dev/cazamor/sui-rejuv/profiles-new
dev/cazamor/sui-rejuv/expander-groups-new
dev/cazamor/auto-save/refresh-settings
feature/llm
dev/cazamor/auto-save/model/json-manager
dev/cazamor/auto-save/settings-model
dev/migrie/s/snippet-params
users/merlinbot/1es-pt-auto-baselining-pr
niels9001/inactive-tab-foreground
dev/cazamor/selfhost/2026-05-20-home
dev/duhowett/fzf-vcxproj
dev/cazamor/selfhost/2026-05-20
dev/cazamor/selfhost/2026-05-19
dev/cazamor/selfhost/2026-05-18
niels9001/fontweight-fixes
niels9001/page-transitions
dev/duhowett/fhl-2026/rewrite-paste-and-dragdrop-handling-writeinputstring
dev/migrie/f/overview-view
dev/cazamor/selfhost/2026-05-13
dev/cazamor/selfhost/2026-05-13-sui
dev/yeelam/f/BuildTest
dev/duhowett/hax/our-own-tabview
dev/cazamor/bugfix/close-scratchpad
dev/cazamor/selfhost/2026-05-05
dev/cazamor/selfhost/2026-05-04-workspaces
dev/cazamor/selfhost/2026-05-04
dev/lhecker/20149-hotfix
dev/lhecker/osc-7-wsl
dev/migrie/workspaces-real
dev/migrie/fhl-spring-2026/quake-4
dev/lhecker/pwsh-5.1
dev/cazamor/sui/dropdown-page
dev/cazamor/selfhost/2026-04-08
dev/cazamor/selfhost/2026-04-06
dev/migrie/fhl-spring-2026/confirmCloseOn
dev/cazamor/confirmCloseOn/dont-ask-me-again
dev/lhecker/inproc-conpty
dev/duhowett/powershell-module-supercharger
dev/cazamor/a11y/vt-seq-prototype
dev/migrie/fhl-spring26/osc777-2
dev/migrie/fhl-spring26/2/notification-infrastructure
dev/migrie/fhl-spring-2026/side-tabs
dev/cazamor/copilot/playground
dev/migrie/fhl-spring-2026/quake-3.5
dev/migrie/fhl-spring26/osc777
dev/migrie/fhl-spring26/unpackaged-notify
dev/migrie/fhl-spring26/bellStyle-notification
dev/migrie/fhl-spring26/activity-notifications
dev/migrie/fhl-spring-2026/x-open
dev/migrie/fhl-spring-2026/quake-5
dev/migrie/fhl-spring26/nextTab-filter
dev/duhowett/atlas-draw-d2d-dots-curlies-consistently
dev/lhecker/14165-conhost-font-size
dev/lhecker/ottosson-by-default
dev/duhowett/hax/unix-pty
dev/duhowett/hax/cmake
dev/lhecker/generate-256-colors
dev/lhecker/dcs-perf
dev/lhecker/1410-large-scrollback
dev/cazamor/selfhost/2026-02-10
dev/lhecker/11509-kitty-keyboard-protocol-wip
dev/cazamor/selfhost/2026-01-29
dev/lhecker/benchcat-fix
dev/duhowett/eoy-25/allow-set-foreground
release-1.23
dev/cazamor/bot/deprecate-area-atlasengine
dev/cazamor/selfhost/2026-01-20
dev/cazamor/selfhost/2026-01-12
dev/cazamor/spec/auto-save
dev/duhowett/fhl-2024/asciicast-recorder
dev/duhowett/eoy-25/underline-colors-in-atlas-bug
dev/duhowett/hax/serial-port-support
dev/duhowett/connection-utf8
dev/lhecker/fused-event
dev/lhecker/18928-wip
dev/duhowett/fhl-2024/clang
dev/duhowett/vt-cache-changes
dev/cazamor/uia-leak
release-1.22
dev/cazamor/selfhost/11-18-v3
dev/cazamor/selfhost/11-18
dev/duhowett/fhl-2025/bitmap-fonts
dev/duhowett/server-2025-vms
dev/duhowett/cant-believe-gotta-do-this-shit
dev/lhecker/dark-mode
dev/cazamor/sui/invert-cursor-color
dev/duhowett/fhl-2025/wt-command-palette-cmdpal-integration
dev/duhowett/fhl-2025/wt-json-relative-icons
dev/lhecker/fucking-service-locator
dev/duhowett/unicode-17
dev/duhowett/multi-blern
dev/lhecker/wellp2-alt
dev/duhowett/wellp2
dev/lhecker/1860-horizontal-scrollbar
dev/lhecker/fix-window-count
dev/cazamor/sui/tab-color-old
dev/duhowett/hax/conhost-icon
dev/duhowett/hax/sui-color-chip-border
dev/duhowett/hax/terminalsettings-as-a-lib-/with-types-merged-into-tsm
dev/pabhoj/page_control_input_cleanup
dev/duhowett/padding-in-atlas-rebase-20250729
dev/lhecker/attach-thread-input
dev/duhowett/portable-shader-members
msbuildcache-reenable
dev/cazamor/selfhost/1.24-2025-06-10
dev/cazamor/upgrade-settings-containers
dev/cazamor/sui/ext-page/powershell-stub
dev/cazamor/selfhost/1.24-2025-05-15
dev/pabhoj/sui_action_overhaul
dev/cazamor/selfhost/1.24-2025-05-06
dev/cazamor/selfhost/1.24-2025-04-29
dev/cazamor/sui/ext-page/lazy-load-objects
dev/cazamor/sui/ext-page/badge
dev/cazamor/selfhost/1.24
dev/lhecker/sdk-26100
dev/duhowett/testing
dev/jadelaga/VS-Pty.Net-1.22
dev/duhowett/fhl-2025/what-if-no-content-ids
dev/lhecker/18584-part2
dev/lhecker/get-lang-id
dev/duhowett/hax/clogs
release-1.21
dev/pabhoj/featurellm_fix_paste
dev/lhecker/grapheme-backup
dev/jadelaga/VS-Pty.netFixes
dev/lhecker/atlas-engine-compute-shader
dev/migrie/s/ai-providers
dev/lhecker/animated-cursor-wip
dev/pabhoj/featurellm_timeout
dev/lhecker/dark-mode-alt
dev/duhowett/osc-strided-table
dev/lhecker/bugbash
dev/pabhoj/featurellm_improve_parsing
dev/duhowett/coast-to-coast
dev/lhecker/curly-improvements
dev/duhowett/net8
dev/duhowett/onebranch-custom-pool
dev/lhecker/renderer-overhaul-2nd-attempt
dev/lhecker/cleanup
dev/cazamor/sui/confirmation-announcements
dev/lhecker/winconpty-cleanup
dev/duhowett/learn/rewrite-highlights
dev/migrie/b/no-nesting-when-searching
release-1.20
dev/duhowett/sel-2-spans
dev/lhecker/7118-cursor-color
dev/lhecker/remove-glyph-width
dev/lhecker/igfw-scroll-region
dev/lhecker/17656-win32im-double-encoding
dev/duhowett/fhl-2024/merge-idls
dev/duhowett/feed-forward-variables
dev/lhecker/remove-chrome-math
dev/duhowett/copylink
dev/duhowett/applicableactions
gh-readonly-queue/main/pr-17566-de50310295b7d92ed3d51f07974a2a945776bf9d
dev/lhecker/atlas-engine-stride-copy
dev/migrie/b/bump-nuget-in-c
dev/migrie/f/992-redux-redux
dev/migrie/f/filter-weight-input-too
dev/migrie/f/disable-nesting
dev/migrie/f/local-snippets-cleaner
dev/migrie/s/1553-mouse-bindings
selfhost-1.22-bugbash-2024-06-04
selfhost/1.22-bugbash-2024-06-04
dev/lhecker/15689-tab-drag-crash-fix
dev/migrie/f/sxnui-font-size-change
dev/migrie/f/local-snippets-on-action-refactor
dev/migrie/f/just-local-snippets
dev/migrie/save-input-patches
dev/migrie/f/md-pane-official
dev/migrie/base-pane
dev/migrie/fhl/tasks-pane
release-1.19
dev/migrie/b/17130-clear-marks-2
dev/migrie/b/17075-its-me-the-killer
dev/duhowett/i-figured-out-why-sometimes-the-publish-build-failed
dev/duhowett/nuget-publication-with-aad-app-id
selfhost-1.20
dev/duhowett/graph
dev/migrie/b/15803-activate-dont-copypasta
dev/duhowett/is-pgo-broken-because-of-sui-being-slower
dev/migrie/b/remove-terminaltab
dev/migrie/fhl/md-pane
dev/migrie/fhl/local-tasks-2024
dev/migrie/fhl/2024-inline-notebook
dev/duhowett/interface-projects
dev/duhowett/dead-loc
release-1.18
dev/migrie/fhl/2024-spring-merge-base
dev/duhowett/hax/l9
inbox
dev/migrie/14073-on-main
dev/duhowett/hax/conhost_dump_replay
user/lhecker/atlas-engine-srgb
dev/migrie/fhl/sxnui-tooltips-3
dev/migrie/7718-notifications-experiments
dev/migrie/fhl/7718-notifications
dev/migrie/fhl/7718-notifications-reboot
dev/lhecker/remove-gsl
dev/lhecker/16575-TerminateProcess
dev/lhecker/window-thread-climate-control
dev/lhecker/client-context-input-output-mode
dev/lhecker/ring-buffer-input-buffer
release-1.17
dev/lhecker/propsheet-fontdlg-refactor
dev/lhecker/renderer-overhaul
dev/pabhoj/test
dev/duhowett/chop
dev/lhecker/til-ulong-cleanup
dev/lhecker/til-env-cleanup
dev/migrie/f/16005-a11y-pane
dev/cazamor/a11y/fastpass
dev/migrie/b/15487-push-cwd
dev/migrie/b/15536-or-15219-idk
dev/duhowett/move-timers-down-into-core-interactivity-etc
dev/migrie/b/15812-broadcast-paste-two
dev/migrie/fhl-fall-2023/11162-quake-III-arena
dev/migrie/fhl-fall-2023/1620-automatic-tab-progress
dev/migrie/fhl-fall-2023/9992-quake-II
dev/migrie/fhl-fall-2023/9992-default-quake-settings
dev/migrie/fhl-fall-2023/9992-window-name-settings
dev/migrie/fhl-fall-2023/oceans
dev/lhecker/ColorScheme-improvements
dev/migrie/search-v2-v3
dev/migrie/pr-15717/its-dangerous-to-go-alone
dev/migrie/f/4768-taskbar-icons
dev/migrie/f/3121-tooltips
dev/duhowett/sticky-control
dev/duhowett/fix-tracing-2
dev/migrie/b/add-support-for-vsc-marks
dev/migrie/f/1860-this-is-literally-what-less-is-for
dev/migrie/s/5916-draft
dev/lhecker/tracy
dev/migrie/s/north-star
dev/cazamor/tag-youre-it
dev/migrie/f/12336-let-it-mellow
dev/migrie/f/now-with-more-compat-settings
dev/migrie/f/compatibility-sui
dev/duhowett/hax/wpf-atlas
dev/duhowett/fgb
dev/migrie/b/15487-relative-paths-are-hard
dev/lhecker/colrv1
loc-update
dev/migrie/fhl/dyndep-csharp
dev/migrie/fhl/dyndep
dev/migrie/fhl-clickable-send-input
dev/migrie/f/cwd-hijinks-5506-15173
dev/lhecker/openconsole-async-start
1.17
dev/migrie/bump-scratch
dev/migrie/f/3726-restartConnection
dev/migrie/b/cxn-restarting-attempt-1-backport
dev/migrie/b/9053-part-3-the-actual-doing-of-the-thing
dev/migrie/b/13388-focus-logger
dev/migrie/b/9053-part-4-i-guess-defterm
dev/migrie/oop/3/of-the-silmarils
of-the-darkening-of-valinor
dev/migrie/fhl/notebook-proto-000
dev/migrie/f/narrator-buddy
dev/migrie/mux-2.8.2-march-2023
dev/migrie/f/roast-mutton
dev/migrie/f/12861-preview-input
dev/lhecker/clang-tidy
dev/migrie/f/3121-wE-dOnT-hAvE-dEv-DaYs
dev/duhowett/compiler-compliance
dev/duhowett/i-have-a-burning-hatred-for-ntstatus-of-later-so-why-not-fix-it
dev/duhowett/shorthand-namespaces
dev/duhowett/rename-all-dlls
dev/duhowett/errordialog
dev/lhecker/gsl-narrow
dev/migrie/b/11522-dumb-idea
release-1.16
dev/miniksa/env
dev/duhowett/hax/embed-everything
dev/migrie/b/13388-attempt-003
dev/migrie/b/14512-test-research
dev/migrie/b/13388-attempt-002
dev/migrie/b/14464-copyOnSelect-moving-text
dev/migrie/s/thema-schema-for-1.16
dev/migrie/s/theme-pair-schema
dev/migrie/b/13388-experiments-1
dev/cazamor/spec/a11y-vt-seq
dev/migrie/b/14557-empty-folder-dropdown
dev/cazamor/spec/a11y-vt-seq-v2
release-1.15
dev/migrie/f/process-model-v3-test-0
dev/lhecker/vsconfig
dev/migrie/s/5000-presentation
dev/lhecker/5907-startup-perf
dev/lhecker/winrt-file-api-benchmark
dev/duhowett/128-bit-compiler
dev/migrie/fhl/more-shell-integration
dev/migrie/b/13388-experiments-0
dev/lhecker/til-to-ulong-improvements
dev/migrie/s/markdown-notebooks
dev/cazamor/a11y/nav-by-page
dev/cazamor/a11y/system-menu-support
dev/duhowett/no-private-registry-keys
dev/cazamor/wpf/uia-expose-enable-events
dev/cazamor/wpf/uia-events
extendAISpec
dev/migrie/fhl/clickSendInput
dev/migrie/fhl/save-command
dev/migrie/b/theme.profile
dev/migrie/b/13943-a-test-for-this
dev/migrie/oop/2/endgame
dev/duhowett/hax/merge_idl
dev/migrie/oop/2/infinity-war
dev/migrie/spellbot-cve
dev/cazamor/a11y-sev3/new-profile-announcement
dev/migrie/fhl/upside-down-mode
release-1.14
dev/migrie/f/9458-startupInfoToTerminal
dev/migrie/fhl/5916-triggers
dev/migrie/b/13523-context-menu
dev/migrie/b/6523-endpaint-outside-lock
dev/migrie/b/12413-OnUnhandledException
dev/lhecker/render-snapshot
dev/cazamor/1.15/scroll-to-point
dev/migrie/mux-2.8-aug-2022
dev/lhecker/lock-console-guard
dev/migrie/f/1504-final
dev/pabhoj/sui_follow_ups
dev/migrie/f/til-winrt.h
dev/cazamor/color-picker-redesign
dev/migrie/fhl/vscode-autocomplete-prototype
dev/migrie/f/1504-prototype
dev/migrie/oop/2/loki
dev/migrie/oop/2/wandavision
dev/migrie/b/8698-YOURE-OUT-OF-ORDER
fabricbot-configuration-migration
dev/migrie/b/12788-did-it-work
dev/migrie/b/localtests-ci-2022
dev/cazamor/1.14/replace-compareInBounds
dev/pabhoj/preview_string
dev/cazamor/ks/switchSelectionEndpoint
dev/migrie/oop/2/COM-ISwapChainProvider-attempt-1
dev/migrie/b/dxd-marker
release-1.13
dev/migrie/b/13066-for-defterm
dev/cazamor/revert-dwm
dev/migrie/b/13066-sw_flash_repeatedly
dev/migrie/b/no-cloaky-cloak
dev/migrie/f/apples-to-oranges
dev/migrie/f/no-custom-caption-btns
dev/migrie/f/10509-mica-and-transparent-titlebars
dev/migrie/b/12911-wpf-focus-fg
dev/migrie/titebar-colors
dev/lhecker/4015-cursor
dev/migrie/fhl/rgb-rainbow-window-frame
dev/migrie/fhl/scroll-marks-prototype
release-1.12
dev/miniksa/compliance
dev/migrie/f/default-icons
dev/migrie/fhl/10175-web-search-for-text
dev/migrie/fhl/menu-complete-prototype
dev/migrie/b/2988-merged-prototypes
dev/migrie/b/2988-niksa-msgs-prototype
dev/migrie/fhl/9583-colorSelection
dev/migrie/b/10609-sui-leak
dev/migrie/b/32-attempt-3
dev/migrie/release-1.12-rejuv-attempt-2
dev/migrie/demo-for-presentation
dev/migrie/b/32-but-im-here-for-12567
dev/duhowett/conpty_first_frame_blug
dev/migrie/b/11092-unfocused-acrylic-settings
dev/migrie/localtests-in-ci
dev/migrie/b/12356-attempt-2
dev/migrie/b/12353-with-null
dev/migrie/b/12387-trim-spaces
dev/migrie/b/5033-bad-start
dev/lhecker/12351-broken-locales
dev/migrie/b/8663-input-to-oem-crash
dev/migrie/b/11743-win10-opacity-is-hard
dev/migrie/f/ctrl-click-elevate
dev/migrie/b/12196-shim-localization
dev/lhecker/issue-4015-til-rect
dev/cazamor/eim/mvvm
dev/migrie/f/--elevate
dev/migrie/b/11668-i-think
dev/migrie/b/11994-wsl-mangline
dev/migrie/eim/3475-action-xmacros
dev/migrie/eim/incremental-build-000
dev/cazamor/a11y/fake-uia-data
dev/migrie/f/non-terminal-content-elevation-warning
dev/migrie/f/632-on-warning-dialog
dev/lhecker/rgba
dev/migrie/b/8480-keybindings-in-tabs
release-1.11
dev/migrie/b/11561-dead-ends
dev/migrie/oct-21-roadmap-update
dev/migrie/fhl/adaptive-card-extension
dev/cazamor/test/11440
dev/migrie/f/warning-dlg-automation
dev/migrie/b/1.12-crash-on-exit
dev/migrie/b/11146-next-tab-in-cmdpal
release-1.10
dev/migrie/5ff9a24-and-75e2b5f
dev/duhowtt/hax/cpal-jumplist-async
dev/lelian/actionid/1
dev/migrie/f/just-elevated-state
dev/lhecker/terminal-settings-cleanup
dev/migrie/gh-10824
dev/pabhoj/cursor_light
dev/migrie/oop/wandavision
dev/migrie/oop/endgame
dev/migrie/oop/infinity-war
dev/lhecker/app-state-actually-hidden
dev/migrie/b/6160-dynamic-default-warning
dev/mgirie/b/more-nchhittest-ideas
dev/migrie/b/9320-interfacial-separation
cinnamon/fhl/find-contextmenu
dev/lhecker/wsl-distro-generator-cleanup
dev/migrie/b/10875-but-more-clever
dev/migrie/b/broken-globalsummon-overloading
dev/duhowett/hax/rle-row
dev/migrie/fhl-2021/cmdpal-select-list
dev/migrie/fhl-2021/differential-pixel-shading
dev/duhowett/hax/no-writable-glyphat
dev/migrie/fhl-2021/more-shader-variables
dev/migrie/titlebar-shenannigans
dev/miniksa/win10_font_matching
dev/lhecker/conhost-oom
dev/migrie/b/10332-less-snappy-scrolling
dev/migrie/b/7422-1px-top-border
release-1.9
dev/cazamor/move-scratch
release-1.8
dev/miniksa/manifest_2
release-1.6
release-1.7
dev/migrie/oop/the-whole-thing
dev/migrie/oop/connection-factory
dev/migrie/f/quake-dropdown-2
dev/miniksa/rle2
dev/migrie/f/quake-toCurrent-experiments-2
dev/migrie/f/quake-toCurrent-experiments
dev/migrie/f/quake-dropdown
dev/cazamor/actions-page/template
dev/duhowett/hax/cursor_stamp_foreground_background
dev/migrie/f/1860-hey-might-was-well-hack-during-a-hackathon
dev/migrie/oop-terminal.control-split-control
dev/duhowett/hax/build-with-wholearchive
dev/cazamor/spec/tsm-actions-temp
dev/migrie/oop-tear-apart-control
dev/migrie/oop-scratch-3
dev/cazamor/sui/bugfix-reload-crash
dev/migrie/f/xmacro
dev/cazamor/sui/proto/profile-nav-view
dev/migrie/f/name-windows
dev/migrie/dol/messing-with-shaders-take-1
release-1.5
dev/cazamor/sui/inheritance-hyperlinks-test
dev/migrie/r/commandline-lib-002
dev/migrie/f/com.fabrikam.toaster
dev/cazamor/adaptive-cards-prototype
dev/migrie/f/commandline-lib
dev/miniksa/zipzoom2
dev/migrie/f/remote-commandlines
dev/migrie/f/632-elevated-profiles
dev/migrie/oop-broker-000
dev/migrie/fix-pr-7015
dev/duhowett/clang
dev/miniksa/input_tests_2
dev/miniksa/input2
dev/migrie/oop-rpc-000
release-1.4
dev/migrie/oop-mixed-elevation-1
dev/migrie/oop-window-content-1
cinnamon/open-json
dev/miniksa/input_tests
dev/duhowett/hax/tsm-graphviz
dev/miniksa/input
dev/duhowett/hax/caption_buttons
release-1.3
dev/cazamor/a11y/expand-line-under-viewport
dev/cazamor/acc/ch/word-nav-perf
dev/cazamor/spec/settings-ui-architecture-draft
dev/duhowett/hax/tap_upgrade
dev/migrie/f/pane-exit-animation
release-1.2
dev/migrie/move-lib-up-and-dll-down
release-1.1
dev/migrie/f/branch-2-backup
dev/migrie/f/settings-getters-only
dev/duhowett/hax/command_palette_search
dev/migrie/f/6856-let-terminalpage-expandcommands
dev/migrie/f/theming-2020
dev/migrie/oop-scratch-4
dev/duhowett/hax/punchout
dev/migrie/s/action-ids
dev/migrie/f/lets-just-generate-these
dev/migrie/oop-scratch-2
dev/miniksa/dcomp
dev/miniksa/gotta_go_fast_spsc
dev/miniksa/gotta_go_fast
dev/miniksa/perf_skip_checks
dev/miniksa/perf_buffer_dig
dev/migrie/s/1203-cursorTextColor
dev/migrie/f/fix-intellisense-i-guess-backup
release-1.0
dev/migrie/f/execute-commandlines
dev/migrie/f/2046-Command-Palette-v2
dev/migrie/b/6421-passthrough-alt
dev/migrie/b/moving-focus-is-hard
dev/miniksa/set
dev/migrie/f/1203-phase-1
dev/migrie/f/get-localtests-in-ci
dev/cazamor/drag-panes
dev/cazamor/tile-background
release-0.11
dev/duhowett/dev/duhowett/hax/appstate_remember
dev/duhowett/hax/wpf_win_8_hax
dev/migrie/b/3088-weird-exact-wrap-resize
release-0.10
dev/migrie/b/4591-custom-scaling-bug
dev/duhowett/hax/attr_smuggling
dev/migrie/b/5161-mingw-vim-fix
dev/miniksa/dx_bitmap
dev/migrie/b/1503-try-messing-with-cooked-read
dev/duhowett/eyebeam
dev/migrie/b/5113-experiments
dev/duhowett/hax-selection-exclusive
dev/migrie/f/more-vt-renderer-tracing
dev/miniksa/bitmap
dev/duhowett/wprp
dev/miniksa/bitmap-mad-with-power
dev/migrie/f/resize-quirk
dev/migrie/f/reflow-buffer-on-resize-002
wpf-renderer-revert
dev/miniksa/draw
release-0.9
dev/miniksa/tabs-color-fix
dev/miniksa/4309
dev/migrie/f/just-wrapping
dev/migrie/b/3490-try-another-resize-algo
release-0.8
dev/migrie/b/3490-a-simpler-resize
dev/migrie/b/3490-resize-down
dev/miniksa/4254
dev/migrie/f/conpty-wrapped-lines-2
dev/migrie/b/be-better-at-hiding
dev/migrie/f/3327-xaml-theming-proto
dev/miniksa/gardening2
release-0.7
dev/duhowett/conpty-flags
dev/migrie/f/603-vintage-opacity
dev/migrie/PR#3181-comments
dev/duhowett/font-64
release-0.5
dev/migrie/b/663-paste-lf-always
dev/migrie/b/2011-reordered-fallthrough-strings
dev/migrie/b/411-init-tab-stops
dev/migrie/b/json-patching-is-hard
dev/migrie/b/2455-try-getting-tests-working
dev/migrie/b/1223-change-256-table
dev/migrie/f/2171-openterm.cmd
dev/migrie/f/drag-panes
dev/migrie/f/2046-command-palette
release-0.3
dev/miniksa/manager
dev/migrie/f/non-terminal-panes
dev/migrie/f/passthrough-2019
dev/miniksa/shared_pch
dev/migrie/f/1897-less-duplicated-work
release-0.2
dev/cazamor/mcs/viewport-selection
dev/duhowett/version_hack
v1.25.1912.0
v1.24.11911.0
v1.25.1322.0
v1.24.11321.0
v1.25.1241.0
v1.25.1171.0
v1.25.923.0
v1.24.10921.0
v1.25.622.0
v1.24.10621.0
v1.24.10212.0
v1.23.20211.0
v1.24.3504.0
v1.23.13503.0
v1.24.2812.0
v1.23.12811.0
v1.24.2682.0
v1.23.12681.0
v1.24.2372.0
v1.23.12371.0
v1.23.12102.0
v1.22.12111.0
v1.23.11752.0
v1.22.11751.0
v1.22.11141.0
v1.23.11132.0
v1.23.10732.0
v1.22.10731.0
v1.21.10351.0
v1.22.10352.0
v1.23.10353.0
v1.22.3232.0
v1.21.3231.0
v1.22.2912.0
v1.21.2911.0
v1.22.2702.0
v1.21.2701.0
v1.22.2362.0
v1.21.2361.0
v1.21.1772.0
v1.20.11781.0
v1.21.1382.0
v1.20.11381.0
v1.21.1272.0
v1.20.11271.0
v1.20.11215.0
v1.19.11213.0
v1.20.10822.0
v1.19.10821.0
v1.20.10572.0
v1.19.10573.0
v1.20.10303.0
v1.19.10302.0
v1.18.10301.0
v1.20.10293.0
v1.19.10292.0
v1.18.10291.0
v1.18.3181.0
v1.19.3172.0
v1.19.2831.0
v1.18.2822.0
v1.19.2682.0
v1.18.2681.0
v1.18.1462.0
v1.17.11461.0
v1.18.1421.0
v1.17.11391.0
v1.17.11043.0
v1.16.10261.0
v1.17.1023
v1.16.10231.0
v1.15.3465.0
v1.16.3463.0
v1.15.2712.0
v1.15.2874.0
v1.16.2641.0
v1.16.2523.0
v1.15.2524.0
v1.15.2282.0
v1.14.2281.0
v1.14.1962.0
v1.15.2002.0
v1.15.2001.0
v1.15.1862.0
v1.14.1861.0
v1.14.1451.0
v1.14.1432.0
v1.13.11431.0
v1.13.10983.0
v1.12.10982.0
v1.13.10733.0
v1.12.10732.0
v1.13.10395.0
v1.12.10393.0
v1.13.10336.0
v1.12.10334.0
v1.12.3472.0
v1.11.3471.0
v1.12.2931.0
v1.12.2922.0
v1.11.2921.0
v1.11.2731.0
v1.10.2714.0
v1.11.2421.0
v1.10.2383.0
v1.10.1933.0
v1.9.1942.0
v1.9.1523.0
v1.8.1521.0
v1.9.1445.0
v1.8.1444.0
v1.8.1092.0
v1.7.1091.0
v1.8.1032.0
v1.7.1033.0
v1.7.572.0
v1.6.10571.0
v1.5.10411.0
v1.6.10412.0
v1.6.10272.0
v1.5.10271.0
v1.5.3242.0
v1.4.3243.0
v1.5.3142.0
v1.4.3141.0
v1.4.2652.0
v1.3.2651.0
v1.3.2382.0
v1.2.2381.0
v1.1.2233.0
v1.2.2234.0
v1.1.2021.0
v1.2.2022.0
v1.1.1812.0
v1.0.1811.0
v1.1.1671.0
v1.0.1401.0
v0.11.1333.0
v0.11.1251.0
v0.11.1191.0
v0.11.1111.0
v0.11.1121.0
v0.10.781.0
v0.10.761.0
v0.9.433.0
v0.8.10261.0
v0.8.10091.0
v0.7.3451.0
v0.7.3382.0
v0.7.3291.0
v0.7.3252.0
v0.6.3181.0
v0.6.2951.0
v0.6.2911.0
v0.5.2762.0
v0.5.2761.0
v0.5.2681.0
v0.5.2661.0
v0.3.2321.0
v0.4.2342.0
v0.4.2382.0
v0.3.2171.0
v0.3.2142.0
v0.2.1831.0
v0.2.1715.0
v0.2.1703.0
v0.1.1621.0
v0.1.1581.0
v0.1.1502.0
v0.1.1431.0
v0.1.1361.0
v0.1.1093.0
v0.1.1161.0
v0.1.1204.0
experiment-master
v0.1.1025.0
experiment-OutsideBuild
broken-tabstops
RS2-final
v0.1.1002.0
experiment-rel-windows-inbox
experiment-f-ServerApp
v0.1.1211.0
1904.29002
1810.02002
1708.14008
Labels
Clear labels
⛺ Reserved
A11yCO
A11yMAS
A11ySev1
A11ySev2
A11ySev3
A11yTTValidated
A11yUsable
A11yVoiceAccess
A11yWCAG
Area-Accessibility
Area-AtlasEngine
Area-AzureShell
Area-Build
Area-Build
Area-Chat
Area-CmdPal
Area-CodeHealth
Area-Commandline
Area-CookedRead
Area-DefApp
Area-Extensibility
Area-Fonts
Area-GroupPolicy
Area-i18n
Area-Input
Area-Interaction
Area-Interop
Area-Localization
Area-Output
Area-Performance
Area-Portable
Area-Quality
Area-Remoting
Area-Rendering
Area-Schema
Area-Server
Area-Settings
Area-SettingsUI
Area-ShellExtension
Area-ShellExtension
Area-ShellExtension
Area-Suggestions
Area-Suggestions
Area-TerminalConnection
Area-TerminalControl
Area-Theming
Area-UserInterface
Area-VT
Area-Windowing
Area-WPFControl
AutoMerge
Blocking-Ingestion
Culprit-Centennial
Culprit-WinUI
Disability-All
Disability-Blind
Disability-LowVision
Disability-Mobility
External-Blocked-WinUI3
Fixed
Gathering-Data
good first issue
HCL-E+D
HCL-WindowsTerminal
Help Wanted
Impact-Compatibility
Impact-Compliance
Impact-Correctness
Impact-Visual
In-PR
InclusionBacklog
InclusionBacklog-Windows TerminalWin32
InclusionCommitted-202206
Issue-Bug
Issue-Docs
Issue-Feature
Issue-Feature
Issue-Question
Issue-Samples
Issue-Scenario
Issue-Task
Needs-Attention
Needs-Author-Feedback
Needs-Bisect
Needs-Discussion
Needs-Repro
Needs-Tag-Fix
Needs-Tag-Fix
Needs-Triage
No-Recent-Activity
Priority-0
Priority-1
Priority-2
Priority-3
Product-Cmd.exe
Product-Colortool
Product-Colortool
Product-Colortool
Product-Conhost
Product-Conpty
Product-Meta
Product-Powershell
Product-Terminal
Product-WSL
pull-request
Resolution-Answered
Resolution-By-Design
Resolution-Duplicate
Resolution-External
Resolution-Fix-Available
Resolution-Fix-Committed
Resolution-No-Repro
Resolution-Won't-Fix
Severity-Blocking
Severity-Crash
Severity-DataLoss
spam
this-will-be-a-breaking-change
Tracking-External
WindowsTerminal_Win32
Work-Item
zAskModeBug
zInbox-Bug
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/terminal#319
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mikemaccana on GitHub (Jul 7, 2018).
(migrated from https://github.com/PowerShell/PowerShell/issues/7080 per @BrucePay's suggestion)
When I cancel a
cmdscript with Ctrl C, the following dialog pops up:I understand why this exists, but I'd also like the option to disable it, so cancelling cancels immediately. Judging by Stack Overflow, I'm not the only one
So a request: could we have an environment variable to control this?
@zadjii-msft commented on GitHub (Jul 9, 2018):
@paulcam206 as the cmd guru, he'll probably have more thoughts on the matter.
I really highly doubt that we could just add an env var to disable this, but it is an interactive-only scenario, so it might be possible...
@mikemaccana commented on GitHub (Jul 10, 2018):
Thanks for responding Mike! Any specific reason why checking a flag would be so difficult? Looking forward to seeing what @paulcam206 thinks.
@zadjii-msft commented on GitHub (Jul 10, 2018):
Honestly, changing cmd.exe at all is a bit terrifying. You can't be sure who in the world is actually depending on that behavior for some reason or another.
relevant xkcd
@paulcam206 commented on GitHub (Jul 10, 2018):
it's possible that this could be done with something like a new
setlocalsetting. however, we've not added one of these in a long time. that said, I'll file an item on our backlog to investigate :)@mikemaccana commented on GitHub (Jul 11, 2018):
Ack @zadjii-msft - not proposing to change the default, so should only affect people who've explicitly set some very long string.
@paulcam206 thanks! I'm not sure about how
setlocalworks - my real experience of cmd is launching cmd files from powershell). Would I still be able to do this in Powershell:Then press
Ctrl Cwhen I need to and have it work?@miniksa commented on GitHub (Jul 11, 2018):
setlocaldoesn't behave the same way as an environment variable. It's a thing that would have to be put in at the top of the batch script that issomefile.cmdas one of its first commands to adjust the way that one specific batch file is processed by thecmd.exeengine. That's probably not suitable for your needs, but that's the way we have to go.I don't think anyone is disagreeing with you, @mikemaccana, that this would be a five minute development change to read that environment variable and change the behavior of
cmd.exe. It absolutely would be a tiny development time.It's just that from our experience, we know there's going to be a 3-24 month bug tail here where we get massive investigation callbacks by some billion dollar enterprise customer who for whatever reason was already using the environment variable we pick for another purpose. Their script that they give their rank-and-file folks will tell them to press Ctrl+C at some point in the batch script to do whatever happens, it will do something different, those people will notice the script doesn't match the computer anymore. They will then halt the production line and tell their supervisor. The supervisor tells some director. Their director comes screaming at their Microsoft enterprise support contract person that we've introduced a change to the OS that is costing them millions if not billions of dollars in shipments per month. Our directors at Microsoft then come bashing down our doors angry with us and make us fix it ASAP or revert it, we don't get to go home at 5pm to our families or friends because we're fixing it, we get stressed the heck out, we have to spin up servicing potentially for already shipped operating systems which is expensive and headache-causing...etc.
We can see this story coming a million miles away because it has happened before with other 'tiny' change we've been asked to make to
cmd.exein the past few years.I would just ask you to understand that
cmd.exeis very, very much in a maintenance mode and I just want to set expectations here. We maintain it, yes. We have a renewed interest in command-line development, yes. But our focuses are revolving around improving the terminal and platform itself and bringing modern, supported shells to be the best they can be on Windows. Paul will put this on the backlog of things that people want incmd.exe, yes. But it will sink to the bottom of the backlog because changingcmd.exeis our worst nightmare as its compatibility story is among the heaviest of any piece of the operating system.I would highly recommend that Gulp convert to using PowerShell scripts and that if such an issue exists with PowerShell, that we get their modern, supported, and better-engineered platform to support the scenario. I don't want you to sit around waiting for
cmd.exeto change this because it's really not going to happen faster than that script could be converted tops1and it fixed in PowerShell Core (if that's even a problem in that world.)@zadjii-msft commented on GitHub (Jul 11, 2018):
oh god I'm having ptsd flashbacks just reading that
@paulcam206 commented on GitHub (Jul 11, 2018):
yep
@bitcrazed commented on GitHub (Jul 11, 2018):
@All - @miniksa @zadjii-msft and @paulcam206 are not kidding - the unexpected impact of even the smallest change to Cmd has resulted in calamities, misfortune, lost-weekends and evenings, stress and unnecessary turmoil.
Cmd is in maintenance mode. It isn't being deprecated or removed - in fact, I doubt it'll EVER be removed from Windows, but do understand that Cmd is extremely fragile and difficult to change.
I keep saying it, and now that PowerShell is available almost everywhere - even Linux & macOS - it's more true than ever:
If you're writing Windows Command-Line scripts today, they should be PowerShell scripts wherever possible
@mikemaccana commented on GitHub (Jul 13, 2018):
Thanks @bitcrazed. I appreciate the testimony directly from the horse's mouth - I've submitted a PR to one of the many node projects that use
cmdscripts, with a.ps1replacement. Hopefully it gets accepted and we start moving node onto a more supported scripting language.@parkovski commented on GitHub (Jul 13, 2018):
It seems to me that cmd scripts are generally used in the place of exe symlinks and shebang scripts, which PowerShell is not a good replacement for - if you switch out
yarn.cmdforyarn.ps1, that's fine if you're already in PowerShell, but if you're in cmd, or some other shell, or usingShellExecuteor some scripting language's equivalent, you have to writepwsh -c yarn, so then why not get rid of the script altogether and donode yarn.js?For this type of thing, we're pretty much stuck with something in
PATHEXT, and I think cmd is the only console interpreter in there.@mikemaccana commented on GitHub (Jul 16, 2018):
Powershell is just as good as cmd here. If you're calling
yarn.jsfrom some other language of course you'd runnode yarn.js, whether yarn comes withyarn.cmdoryarn.ps1. The point is you can typeyarnfrom the command line (which in Windows is powershell) and it runs yarn, and when something goes wrong you don't have to debug something which isn't maintained anymore. I've replied on https://github.com/yarnpkg/yarn/pull/6093 with more info - it may be best to move the discussion there.@parkovski commented on GitHub (Jul 16, 2018):
Well, relevant to this thread, adding the setlocal option is just as good and addresses my concerns also - then all the projects that use cmd scripts this way just add another line at the top.
It still requires projects to opt into this behavior, and it's not compatible with older versions of Windows (well, it's compatible, just ignored), but it seems like the best way to do this to me. Doesn't break any other cmd scripts assuming
yarnis a command, and I'd be happy replacing my hacked together exe launcher with these.With all the recent console improvements and WSL, I think there's a possibility of seeing alternate shells on Windows in the future. Cmd may be in maintenance mode, but people still use it too, so I'm not a huge fan of this assumption.
Personally I'd really like to see the setlocal option, regardless of how projects choose to handle this.
@xenu commented on GitHub (Jul 25, 2018):
It's true. For example, perl wraps all scripts installed from cpan with a few lines of batch code loading perl executable using its
pl2batscript.setlocalvariant would be very helpful for perl because it would allow us to fixTerminate batch job (Y/N)?issue by makingpl2bataddsetlocalline to scripts generated with this tool .@be5invis commented on GitHub (Sep 29, 2018):
@bitcrazed
But, executing PowerShell script is not enabled by default.
@be5invis commented on GitHub (Sep 29, 2018):
@parkovski
An interesting idea would be using WSF/WSH files.
@Jack-Works commented on GitHub (Apr 2, 2019):
Any progress on this issue?
@zadjii-msft commented on GitHub (Apr 2, 2019):
We're not going to make changes to cmd.exe to support this scenario.
@Jack-Works commented on GitHub (Apr 2, 2019):
Okay, I understand this.
But, is there an unofficial / hack solution to this?
I searched the web and only found someone patching binary to do this.
Unfortunately, that only works for Windows XP to and Windows 7
Then I found another project, https://github.com/sgraham/cmdEx
Only works for Windows 8.1 32bit
:(
@be5invis commented on GitHub (Apr 2, 2019):
Something replacing .cmd and .bat?
PS1 is too complex and too slow.
发件人: Jack Works notifications@github.com
发送时间: Tuesday, April 2, 2019 10:06:41 PM
收件人: Microsoft/console
抄送: Renzhi Li; Comment
主题: Re: [Microsoft/console] cmd: add environment variable to disable/enable 'Terminate batch job (Y/N)?' confirmation (#217)
cmd.exe is very, very much in a maintenance mode and I just want to set expectations here. We maintain it, yes. We have a renewed interest in command-line development, yes. But our focuses are revolving around improving the terminal and platform itself and bringing modern, supported shells to be the best they can be on Windows.
We're not going to make changes to cmd.exe to support this scenario.
Okay, I understand this.
But, is there an unofficial / hack solution to this?
I searched the web and only found someone patching binary to do this.
Unfortunately, that only works for Windows XP to and Windows 7
Then I found another project, https://github.com/sgraham/cmdExhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsgraham%2FcmdEx&data=02%7C01%7CRenzhi.Li%40microsoft.com%7Cea8b6c7e4ee14e5d780d08d6b7746eb7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636898108031211694&sdata=Id%2FYm1klHq6nHjQY50Uph9FdTWHsGsTXRYOODmYox8s%3D&reserved=0
Only works for Windows 8.1 32bit
:(
―
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fconsole%2Fissues%2F217%23issuecomment-479012154&data=02%7C01%7CRenzhi.Li%40microsoft.com%7Cea8b6c7e4ee14e5d780d08d6b7746eb7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636898108031211694&sdata=dVp4NGya3W6yH7NMFgg87lb38fhjj7r%2F%2Fmr3xTTwHuM%3D&reserved=0, or mute the threadhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAOp25uHVKve6DUbDGCsqYMg3lRvJlcDks5vc2PxgaJpZM4VGR0n&data=02%7C01%7CRenzhi.Li%40microsoft.com%7Cea8b6c7e4ee14e5d780d08d6b7746eb7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636898108031221686&sdata=jVKSOX8R0tjLrlcqejdOgDPJ4pTVFg9FhuzSKS7fPAc%3D&reserved=0.
@miniksa commented on GitHub (Apr 2, 2019):
@Jack-Works, we are not in the business of developing or propagating unofficial hacks to our software. If you figure something out, more power to you. But we can't help you there.
@be5invis, I'm sure the Powershell team would be happy to accept your feedback and improve their product. They are the Microsoft team that has funding for the interactive shell space.
@mikemaccana commented on GitHub (Apr 5, 2019):
As everyone else says, the fix for this is moving from
cmdtops1. @bitcrazed mentioned he's going to publish a blog post recommending people do this a little while ago (since a lot of node folks etc are producing newcmdscripts).While we wait for peopel to start distributing
ps1scripts, the safest bet to handle leftovercmds is to etiher press Ctrl C twice or use something like Hyper's https://hyper.is/plugins/hyper-yes@musm commented on GitHub (Apr 11, 2019):
I agree with the problem with using powershell here instead of cmd; which I agree would be ideal, except it's far too slow in its initialization time. Even more unfortunately the new pwsh is even slower to initialize. This is something I opened an issue about, but the situation is not likely to be improved https://github.com/PowerShell/PowerShell/issues/6443.
Startup latency:
466 ms POWERSHELL
42 ms CMD
500 ms is way too long for a script, hence I'm not sure the solution to use ps1 is actually reasonable.
Here's the script to test start up latency
@miniksa commented on GitHub (Apr 11, 2019):
CMD.exe is not getting updated. I don't know how to stress that any further.
@musm commented on GitHub (Apr 11, 2019):
Sorry I should've been made it clear that I know that cmd.exe won't be updated. I wanted to highlight the issues with the powershell recommendation, compared to using cmd.exe, and that hopefully an another solution may exist.
@be5invis commented on GitHub (Apr 12, 2019):
@miniksa @musm @zadjii-msft
.PS1's problem:From my view, the best solution for “
.cmdstubs” might be generating an EXE stub (like Shimmy), if it does not irrate anti-malware softwares. A code signature may reduce such false positives (sign the code part and put the command line pattern into the rest places.)ForUPDATE: It doesn't work. WSH starts the Node process in a new window.npm, an interesting solution may be using.jsfiles directly and launch them with WSH -- and then forward it to the real.jsentry points.@parkovski commented on GitHub (Apr 19, 2019):
I don't know all the details of this and would be curious to hear some more informed opinions, but:
MZ.#!.Is there any way to inform the loader that when the magic number is
#!, it will be passed to the interpreter specified in the rest of the line, like linux shebang files? As far as I can tell, this would solve all the issues regarding slow shell startup time (we bypass PowerShell and cmd altogether), thePATHEXTissue that exists with.ps1files, the pain point of trying to launch them from WSL, and any weird behavior caused by using cmd.exe for this purpose.It also seems to me, although I'm certainly not an expert, that there wouldn't really be a security risk here, as a regular binary exe could do anything and more that a shebang script could, and if signing was enabled for these scripts, I can't see how they would be any different than any other exes.
@oising commented on GitHub (Apr 19, 2019):
@parkovski This wouldn't be safe at all since Windows has no equivalent of the execute bit (chmod +x).
@parkovski commented on GitHub (Apr 19, 2019):
Why not?
.exeis the execute bit. Totally open to corrections, but a shebang exe would be basically equivalent to a shim exe that just launches another process, without the overhead of actually loading a launcher process. All other security features that already apply to exes would still apply to this type; it's just a special form where the shebang line replaces the exe name, just as.batautomatically invokescmd.exe, or a shim exe can "fork out" to another exe.As in, what is the difference between these two:
#!node ....nodewith the text stored somewhere in the file that can be extracted with WinAPIs.I don't see any difference, except that one is easily human creatable/editable, while the other requires a compiler.
Look at the scoop package manager's shims. They are a hack around this - an exe that loads a text file and launches it. I don't see how extending the exe could possibly be any more dangerous than what is already available.
@oising commented on GitHub (Apr 19, 2019):
Oh, I see -- you're not advocating allowing any file to be a shebang script. I can't speak to the can of worms that would open, nor do I ever think this would be considered but it's interesting to ponder nonetheless.
@parkovski commented on GitHub (Apr 19, 2019):
Yeah, I'm not too optimistic about this actually being embedded in Windows, but if we were allowed to have
!#exes (and only.exes), I think that would solve a lot of these weird cmd script issues.@albertjan commented on GitHub (May 7, 2019):
I'm just going to leave this here :D https://github.com/sgraham/cmdEx for people that don't accept reality and want to substitute it with something else.
@giggio commented on GitHub (May 24, 2019):
You could just open source cmd and somebody would just produce a highly compatible (but not fully), and with these tiny new things we all want. A cmd2, let's say, or even a cmd we could replace the original one with. That big enterprise will never see it, and we all get to live a little bit better.
@DHowett-MSFT commented on GitHub (May 24, 2019):
We've got enough on our hands with the new open-source Terminal. Thanks for the suggestion, though!
@SteveDrakey commented on GitHub (Jun 26, 2019):
Personally, I would like to see this feature tied somehow to
developer modedeveloper modecould unlock more options not just side loading apps. If the big corporation is running servers in developer mode then well... (You could couple dev mode with the above suggestions)I run
npm starthit CTRL C, and I get the
Terminate Batch Job Y/NI just HIT CTRL C why are you asking me thisIf I hit N it does the same as Y anyways in this example.
@eryksun commented on GitHub (Dec 30, 2019):
Filesystems that support ACLs (i.e. those with the flag
FILE_PERSISTENT_ACLS), such as NTFS (required for the system drive), have equivalentFILE_EXECUTEdiscretionary access control.CreateProcessWwill fail with access denied (5) if the caller doesn't have execute access.For example, grant the owner of "spam.exe" generic execute access and the right to modify the discretionary ACL:
icacls "spam.exe" /grant *OW:(GE,WDAC). (The File object type mapsGENERIC_EXECUTEaccess toFILE_EXECUTE | FILE_READ_ATTRIBUTES | READ_CONTROL | SYNCHRONIZE. "OW" is SDDL for the "OWNER RIGHTS" security principle.)We can also set
SYSTEM_MANDATORY_LABEL_NO_EXECUTE_UPmandatory access restriction for caller's at a lower integrity level than that of the file, but Windows doesn't include a command-line utility to modify the no-execute-up flag in a file's mandatory label.One major problem is portable filesystems such as FAT32 and exFAT that lack security. You'd need a policy to disable shebang support for these filesystems. The next problem is that the default ACLs in Windows liberally grant execute access based on rules inherited from the root directory and the primary system directories (e.g. "Windows", "Program Files", "ProgramData", "Users"). Removing inherited execute access would require assigning custom security instead of relying completely on inheritance.
Filetypes that
ShellExecuteExWpasses directly toCreateProcessWuse"%1" %*as their command template, where"%1"is the file itself. This is currently used for ".EXE", ".COM", ".CMD" and ".BAT" files. In principle this can be extended to filenames that have no extension. To the shell this is ".", because "spam" and "spam." are equivalent in DOS.@be5invis commented on GitHub (Dec 30, 2019):
@parkovski
Another option may be let
npm, etc. to generate real EXE files that simply launchesnode whatever. There should be able to create some trick to keep the EXE signed.@ilya-g commented on GitHub (Jan 10, 2020):
@miniksa Is it possible to introduce a flag in the registry instead of an environment variable for that purpose? As far as I can see, that would address this concern.
@zadjii-msft commented on GitHub (Jan 10, 2020):
Then there's just another billion-dollar enterprise out there that for some unknowable reason is already setting that flag in the registry for some other purpose, and will run into the same issues.
@armordog commented on GitHub (Jan 10, 2020):
Surely you're kidding.
This would prevent any changes to any aspect of Windows.
@be5invis commented on GitHub (Jan 11, 2020):
GUID should be good for this 🙂
Nobody can predict GUID
@eryksun commented on GitHub (Jan 12, 2020):
No enterprise has any business adding custom values to CMD's configuration key, "[HKLM|HKCU]\Software\Microsoft\Command Processor". Surely you have to draw some reasonable lines in the sand with your customers.
@parkovski commented on GitHub (Jan 12, 2020):
This looks to me like a case of the emacs spacebar. Obviously nobody wants to potentially deal with these kind of issues. On the other hand, this is a stupid feature that everyone wants to turn off globally. I agree that an environment variable is risky, but the registry key strikes me as the all-around best solution to this.
ENABLE_VIRTUAL_TERMINAL_PROCESSING. Maybe other things as well, but I at least know of this one.I understand the fear of changing cmd and I can't be upset with you guys if you don't change this (although I can certainly be upset at whoever introduced it). If it did happen though, you guys are already minor personal heroes, but I guess it'd be an extra point there, and I think that's all I got.
@zadjii-msft commented on GitHub (Jan 13, 2020):
I was 85% joking, and 15% "we've been burned literally every time we've touched cmd.exe so it's almost certainly not happening"
Even the
ENABLE_VIRTUAL_TERMINAL_PROCESSINGrequired us to go back and change it such thatcmd.exeonly enables that flag for itself, and disables it again for child processes.@arcanis commented on GitHub (Sep 17, 2020):
@zadjii-msft Please correct me if I'm wrong (seriously! I hope I am 😄), but I think Powershell isn't a good general option. Even if we add
.ps1in the PATHEXT, it seems that the default file association opens it with Notepad or VS, which prevents it from being a replacement for cmd being used as a kind of "enhanced symbolic link" (we pass additional arguments).It's your project, and any change would be your responsibility so I understand if it doesn't happen, but the
setlocaloption sounded interesting (it requires scripts to opt-in, but precisely it requires scripts to opt-in), and would definitely be useful to us.@arcanis commented on GitHub (Nov 25, 2020):
Of note, we tried these past months to use a binary to workaround this problem, but it unfortunately doesn't work for some of our users that are in locked Windows environments. Even signing our jumper wouldn't help in those circumstances ...
@rivy commented on GitHub (Dec 3, 2020):
@arcanis , I've realized that a known quirk of CMD can be used as a work-around.
I've used this to work around another annoying CMD bug (the fact that
exit /b 1within a script doesn't set the process exit code unless the script in question is called viacall SCRIPT, which is obviously uncontrollable by the script itself; further explanation (and fix) is within the commentary for commit9a7db966that I added topl2bat.But you can use the same quirk here to kill the calling script, avoiding any "Terminate batch job (Y/N)?" prompt originating from the calling script, while still executing the remainder of the code in the parsed unit.
The
title %COMSPEC%command is included in order to work-around the fact that using this prevents the caller from resetting the window title to a prior value which can lead to ever-expanding window titles. I think it's a minor inconvenience for the benefits gained: both the suppression of "Terminate..." and correct process exit values, no matter how the script is called.In example, I'm using the following code as a replacement for the
npmshim for my installation ofhexo...This construction of the
hexoshim runs thenode.exeexecutable in "command line mode" so any interrupts are not passed back up to the caller batch file. I've suggested thatnpmstart using it as a template for future shims (see https://github.com/npm/cli/issues/969 and https://github.com/npm/cmd-shim/pull/46).And, although I might personally consider this something of a "hack", it uses the standard, non-patched, CMD shell. So, it should be fair game. And, I expect, some billion-dollar customer will soon be using it somewhere (if they aren't already), so it should be stable. 😄
@haseakash commented on GitHub (Sep 19, 2021):
Hello All ,
For anyone having issues ctr+c and break of batch. Then just use Keyfreez software.
you can run keyfreez at the start of the batch and end it using taskkill command at the end of batch
It disable whole keyboard.
@noseratio commented on GitHub (Oct 11, 2021):
It appears like nobody wants to approach
cmd.exeand touch it with a stick, because "we can break something". Socmd.exehas been in "maintenance mode", while its legitimate use keeps growing due to the popularity of CLI tools like Node.js, NPM, Deno etc., which heavily rely upon.CMDand.BATfiles on Windows.I struggle to come up with even a contrived scenario where the proper Ctrl+C handling (especially behind a feature flag) could possibly break any legacy scripts. OTOH, I can think of a magnitude of cases where the current behavior causes annoyances and harm.
E.g., when the following batch file is executing and I hit Ctrl+C trying to stop it, the infamous
"Terminate batch job (Y/N)?"prompt is shown. I hit Ctrl+C again to escape, but the execution is continuing instead, deleting my GIF files:For a more convincing example, speak to this person:
Luckily, there's new
CreatePseudoConsoleWin32 API that should make possible to create a proper shim forcmd.exe, to look for and intercept the"Terminate batch job (Y/N)?"prompt. Such shim can then be set as an active command shell viaCOMSPECenv variable.When time allows, I'm going to explore this options, like I did to address another controversial behavior, paste-with-formatting-by-default.
@miniksa commented on GitHub (Nov 3, 2021):
This specific issue came in through Feedback Hub as well and I spent some time reproducing it. When I use conhost.exe, the first time I run the contrived script and do Ctrl+C twice, it exits properly. But subsequent runs, it deletes at the second one anyway. And when through Terminal... it just immediately goes to the second state and deletes.
So you've hit my interest further and I will be pulling this particular case out into a separate bug to figure out why the state changes and differs.
EDIT: MSFT:36733663
@eryksun commented on GitHub (Nov 4, 2021):
Canceling the batch termination prompt uses no as the default answer, and thus the script continues to run. In particular,
cmd!PromptUser()handles a failed/canceled or empty (EOF) read by defaulting the answer to no. That's reasonable behavior in the general case (e.g. do not delete all the files in the "foo" directory fordel foo). For the batch termination prompt, it probably would have been more reasonable to handle repeated Ctrl+C presses by terminating the script instead of canceling the prompt itself. (I'm thinking of a user frantically pressing Ctrl+C.) A parameter could have been added toPromptUser()to set the default answer instead of hard coding no as the default.@simonbuchan commented on GitHub (Apr 5, 2022):
If MSFT is still watching this... what's the likelihood of being able to add a stub-specific replacement, and a new default entry to PATHEXT? I'm thinking the
.cmdstub builders of the world likenpmcan instead emit a.some-stub-extfile that contains some trivial format like:If it's part of windows, runs very fast, doesn't alter
cmd.exeetc., that seems to mostly fix people's issues in this thread. It's mostly the change to the PATHEXT default that seems scary.@simonbuchan commented on GitHub (Apr 5, 2022):
Notably,
.lnkfiles cover a lot of that usage, and seems to work quite well if you add them to PATHEXT. Are there issues with using.lnkas stubs?@doctorpangloss commented on GitHub (Oct 27, 2023):
@zadjii-msft can you hear the people chanting "
Terminate batch job (Yes/No)has got to go!"?One option is to break cmd.exe, forcing all shims to be authored anew. Because the prompt is kind of on the journey there already.
Yeah. But like those people will keep using Windows, as much as you break it for them, but the people in this thread will keep switching to macOS. Kind of apples to oranges. It's been 5 years.
@zadjii-msft commented on GitHub (Oct 27, 2023):
You're heard, for sure. But we're not planning on touching
cmd.exe. Literally last week we had a P0 fire where we broke the core Windows build because we tried making what seemed like a trivial internal change to the CMD.exe code. It's literally burned us 100% of the times we've tried to touch it.If you want a modern, updated shell on Windows, you should try out PowerShell 7. Or clink. Or yori.
@oising commented on GitHub (Oct 27, 2023):
This would make a super interesting blog post (which you could point people to any time they ask this again) -- maybe ping Raymond Chen? :D
@doctorpangloss commented on GitHub (Oct 28, 2023):
I use https://frippery.org/busybox/
Would it be possible to release the source of
cmd.exe? Is it even that sensitive? Lemme pitch the metric: "Number of cmd.exes open sourced." An increase in this metric from 0 to 1, it's +infinity percent!I got you, thanks for the kind note.
@noseratio commented on GitHub (Oct 28, 2023):
Sadly, many popular CLI/DevOps tools (Node.js, NPM, Chromium build, etc) already use CMD on Windows, and that's not gonna change, they won't switch to PowerShell.
The fear of changing CMD to actually terminate upon Ctrl+C is not only irrational, but also dangerous.
E.g., like I mentioned previously in this thread, the following will delete all .gif files, when I franticly press Ctrl+C two times while trying to stop it. It's just beyond my comprehension.
At least, it it possible to make the second Ctrl+C act as
Ywhen CMD is already askingTerminate batch job (Y/N)?❓What do you think about that, @zadjii-msft?
@skissane commented on GitHub (Mar 12, 2024):
I understand why you are terrified of changing anything in
cmd.exe.But:
cmd.exealready looks at, even put a random GUID in the key or value name so the chance that it already exists is astronomically lowcmd.exestartup, check if that registry value exists and has the value1, and if so set an internal boolean flagTerminate batch job (Y/N)?prompt, act as ifYwas answered. This is likely just one extraifstatement (if that)That way, people who want to make this prompt go away, can create the new registry key/value.
It is rather difficult to conceive of a way in which the above change could possibly break anything. If the registry key/value isn't set, it behaves identically to at present. If setting it breaks something, the solution is to remove that registry setting.
@andry81 commented on GitHub (Mar 13, 2024):
@skissane
Bad idea. It will affect all cmd.exe instances. Better, for example, to extend
setlocalwith a new flag like:setlocal DISABLECTRLBREAKINTERACTION@noseratio commented on GitHub (Mar 13, 2024):
Keep speaking into void, folks. Whoever hopes this abomination will ever gets a proper fix, check this historic question: https://superuser.com/questions/35698/how-to-supress-terminate-batch-job-y-n-confirmation
@oising commented on GitHub (Mar 13, 2024):
@skissane said:
With these words, you explain exactly why this change is so insidiously dangerous.
@noseratio commented on GitHub (Mar 14, 2024):
Can it get any worse than data loss, caused by the existing behavior, when it simply continues if you hit Ctrl+C twice? Someone deleted the whole database! 🥲
As is, it's not just annoying, it's dangerous enough already.
@oising commented on GitHub (Mar 14, 2024):
I don't disagree, but somebody, somewhere, is depending on this behaviour.
@noseratio commented on GitHub (Apr 11, 2024):
And this behavior, too ;)
"BatBadBut: You can't securely execute commands on Windows"
https://flatt.tech/research/posts/batbadbut-you-cant-securely-execute-commands-on-windows/
I wonder if CMD.exe will be touched to address this vulnerability. But of course it is different from "Terminate batch job (Y/N)?" 🥲
@anonghuser commented on GitHub (Aug 7, 2024):
I can see how changing the default behavior of cmd or its
pausemay burn someone, but adding a new command-line switch topauseto make it set errorlevel when interrupted or an optional, opt-in mode to cmd should not be an issue.(edit: "opt-in mode to cmd" = setlocal yes, don't know why @miniksa said it's "probably not suitable for your needs", seems perfect for mine)
Failing that, please at least make
powershell pause || exitnot wreck cmd's font...@noseratio commented on GitHub (Aug 7, 2024):
This nuisance, along with some brand new recent "improvements" to Windows, has finally pushed me to move my preferred dev environment to Linux, and I'm not missing anything. I'm glad I've decided to not wait for another 20 yrs for some sort of resolution to this.
@blloyd75 commented on GitHub (Jan 28, 2026):
I saw the suggestion to just use powershell to avoid this problem, and that is just sad. There is a big problem with just replacing all .bat files with .ps1 files, unless perhaps there is a way to wrap the call in a batch file that doesn't depend on admin prilidges to ensure the script can run?
Powershell is MUCH more powerful, and Microsoft in their wisdom gave the ability to disable powershell scripts, so you cannot rely on powershell scripts being available EVERYWHERE like claimed.
When I have had to wrap more than one ps1 script with a batch file starting like this, powershell is not yet ready to replace .bat files.
powershell "if ((Get-ExecutionPolicy) -ne 'Unrestricted') {Start-Process powershell -Verb RunAs -Wait -ArgumentList Set-ExecutionPolicy, Unrestricted;}"
So is there a different option which can actually be confirmed to work?
From some basic documentation:
Execution Policy Types
On Windows systems, common execution policies include:
Restricted: (Default for Windows client computers) Permits individual commands, but prevents all scripts from running.
@noseratio commented on GitHub (Jan 28, 2026):
@blloyd75
WSL and bash, can be used from a self-hosted build agent in Azure DevOps.
Otherwise, I wouldn't keep high hopes for a native Windows solution; my comment above was hidden as "abuse".
@DHowett commented on GitHub (Jan 28, 2026):
Your scare quotes don't work here. I hide abusive comments as abuse. Called-as-seen.