mirror of
https://github.com/microsoft/terminal.git
synced 2026-09-25 00:15:10 +00:00
Feature Request: Clients of terminal need a way to inquire about the capabilities of the terminal #1392
Open
opened 2026-01-30 22:24:38 +00:00 by claunia
·
93 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#1392
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 @rkeithhill on GitHub (May 28, 2019).
Summary of the new feature/enhancement
Maybe this is as simple as an environment variable like VSCode uses for its terminal e.g.
TERM_PROGRAM=WindowsTerminal/TERM_PROGRAM_VERSION=0.0.1.0.Proposed technical implementation details (optional)
Start by creating the environment variables above so those of us using PowerShell can adapt our user experience (via PowerShell profiles) to Windows Terminal.
@DHowett-MSFT commented on GitHub (May 28, 2019):
As of #897, you can look for
$Env:WT_SESSION@oising commented on GitHub (May 28, 2019):
@dhowett-msft why not use TERM_PROGRAM also, like vs code, hyper and fluentterminal already do? Not too late to change :)
@vexx32 commented on GitHub (May 28, 2019):
Agreed. We can't keep creating new environment variables every single time a new terminal program comes out. Linux already uses $env:TERM and if we have to check several per platform it's just terrible from a UX standpoint. Why reinvent the wheel yet again?
@Jaykul commented on GitHub (May 28, 2019):
An application-specific variable like
WT_SESSIONis really awful for anyone trying to determine what features they can use. I certainly don't want to have to check a dozen different environment variables to figure out what terminal I'm running in.TERM_PROGRAM is slightly better, but is really just a lazy version of TERM, which is what all of these terminals should be setting.
Eventually, we're going to get a
curseslibrary and a real terminfo database with@TIC@and@INFOCMP@macros, shouldn't we start behaving well now?@DHowett-MSFT commented on GitHub (May 28, 2019):
Hold up, I think there's been a misunderstanding here. I'm sorry about that.
We should definitely support
TERMorTERM_PROGRAM. Unfortunately,TERMhas become somewhat like a user agent: "I work like this terminal, I promise" -- right up until it doesn't.TERM_PROGRAM, I've never heard of. What does it do? Who is expected to use it, and for what?WT_SESSIONis something else. Today, it can be used to detect Windows Terminal. It is informative, not normative, as a detection mechanism.WT_SESSIONtags an individual session -- it is a GUID that the shell (or some other enlightened application) can use in coordination with the terminal to support application state resumption. This feature was inspired by both Terminal.app (the stock terminal emulator on OS X) and its featureful replacement, iTerm2. There's no new and divergent art here.The idea there is that if WT eventually supports reloading and showing a session's history, that resumed state will use the same session GUID so the shell can do additional things like restoring the working directory or anything else it might have saved off.
@DHowett-MSFT commented on GitHub (May 28, 2019):
This is why I threw it out as an example and didn't close the feature request. I'll seek to communicate things that are rattling around in my head a bit better going forward.
@heaths commented on GitHub (May 29, 2019):
It would be nice if conhost would define new
TERMvalues as well, so that we can know if we can use larger color palettes (of course, the fact it gets defined would imply that since it would be only in newer versions), differentiate conhost vs. Terminal, etc. In compiled code, it's easy enough to figure out viaGetConsoleMode, but in shell scripts (cmd, powershell, etc.) not so much. For examples, flavors of linux definexterm,xterm-color, andxterm-256color, as well as many others. Some convention similar to that indicating color palette (level of VT support) or even Unicode support would be helpful to provide rich console experiences.@be5invis commented on GitHub (Jul 4, 2019):
@DHowett-MSFT Maybe both?
TERM_PROGRAMfor the application name, andTERMfor "feature detection"?@Tyriar commented on GitHub (Nov 25, 2019):
AFAIK the majority of (non-Windows?) terminals support
TERM_PROGRAMandTERM_PROGRAM_VERSION, it's one of the few environment variables vscode's terminal touches (alongsideTERM,LANG,COLORTERM). Whether WT should supportTERMis another discussion.xterm-256colorfor best compatibility (provided the terminal supports 256 color).@bcdev-com commented on GitHub (Nov 28, 2019):
I just stumbled across an, obvious in retrospect, but irksome problem with using WT_SESSION as an indicator that you're running inside Windows Terminal. Since it is just a normal environment variable, it propagates as you'd expect, which means if you've launched VSCode from inside Windows Terminal, then the integrated terminal there also has WT_SESSION set, and to the parent value, which would stomp on the intended use for application state resumption.
That's behaving as expected, but certainly isn't desirable. Seems like more reason to need TERM_PROGRAM set as well.
@DHowett-MSFT commented on GitHub (Nov 28, 2019):
Consider that
TERM_PROGRAMwould be inherited if you spawn another terminal emulator from WT- like, for example,:terminalin gvim. I’m not sure the heritability of environment variables makes the case forTERM_PROGRAMstronger exactly.@bcdev-com commented on GitHub (Nov 28, 2019):
True, but if the defacto protocol is that all terminal emulators set
TERM_PROGRAM(and presumablyTERM_PROGRAM_VERSION) in the child environment that's a non-issue. That would make it a bug in gvim's:terminalsupport if it isn't overwriting those environment variables before spawning it's own shell process.@mixmastamyk commented on GitHub (Dec 13, 2019):
+1 vote for TERM_PROGRAM, it is also used on Apple and iTerm terminals.
Also, I just checked and WT_SESSION is set for CMD but not for WSL/bash. Whatever var y'all choose, it should be available from every shell for terminal detection to be reliable.
@DHowett-MSFT commented on GitHub (Dec 13, 2019):
Thanks for that report; I split it out into #3948.
@gerardog commented on GitHub (Dec 17, 2019):
In my case I don't care much about what terminal program the end user is using, except that I want to know if I can send VT sequences or not. It would be nice if GetConsoleMode api returns the ENABLE_VIRTUAL_TERMINAL_PROCESSING flag enabled when called within a Windows Terminal console or other consoles that already supports VT. If it is possible for the Windows Terminal team implement this it may also be possible to request that on Cmder/ConEmu and have a standard windows way to determine that particular console capability. Using WT_SESSION environment variable already gave me a false positive because I am used to just use
start cmdto spawn new consoles, and they inherit the env variable even when running on the regular ConHost.@DHowett-MSFT commented on GitHub (Dec 17, 2019):
The presence of Windows Terminal, or any other terminal, does not indicate that the
ENABLE_VIRTUAL_TERMINAL_PROCESSINGflag is set. Because it is possible to store raw escape sequences in the text buffer with that flag turned off, it must be possible (and even, in some instances, recommended for legacy compatibility) to turn it off. Allowing the connected terminal to parse VT sequences that the console did not parse will lead to visual artifacting ala #1965 #2130 #2759 #1960.@Richienb commented on GitHub (Jan 15, 2020):
I propose the following spec:
As well as setting the
WT_TERMINALenvironmental variable, use a similar strategy to setTERM_PROGRAMtoWindowsTerminal.cc @DHowett-MSFT @heaths @Tyriar
Please get this out of the backlog.
@DHowett-MSFT commented on GitHub (Jan 15, 2020):
I appreciate that there are folks who care about this, but I’m just not convinced of its value.
TERM_PROGRAMhas been likened to a browser user agent string, which makes good sense to me if you’re going to use a user agent string to do feature detection. By and large, the past 25 years of web development have shown us that that was almost certainly the wrong thing to do.If somebody can come up with a legitimately compelling use case apart from “I want my shell to act differently if I’m in different terminals” (which is easily achievable through other means), I’m all ears!
Also: please don’t get in the habit of calling out contributors and community members by name when you want to be heard. If everyone did this for every one of our hundreds of open workitems that someone cares about, we would be deep in emails indeed. Most of us already are: we generally get an email for every comment on every bug in this repo.
@Richienb commented on GitHub (Jan 15, 2020):
@DHowett-MSFT
A big thing is compatibility detection. Especially for the new Emoji support.
If the script knows it's running in the Windows Terminal, it uses fancy emojis. If not, it uses legacy emojis pulled from Code page 437. At this point, using
!!process.env.WT_SESSIONto detect this just seems like a weird hack that isn't being used for its true purpose.See https://github.com/sindresorhus/figures/pull/27#issuecomment-504764201
I need at least a thumbs up from a collaborator for this repository that
WT_SESSIONwill be sticking around for a long time and that I can confidently rely on it.@gerardog commented on GitHub (Jan 15, 2020):
Environment variables are not a perfect solution since you can 'start cmd' and that will open an old ConHost with WT_SESSION set.
@Tyriar commented on GitHub (Jan 15, 2020):
@DHowett-MSFT for basically every other nix terminal and many on Windows, you can look at
TERM_PROGRAMto see what terminal the app is being run within, but now anything that does this also needs to checkWT_SESSIONas well? And what if another terminal is launched from WT, then you have bothTERM_PROGRAMandWT_SESSIONso it's impossible to tell which value was set by the "inner" terminal (WT might create a fresh env block in which case this might not apply).You say it's inspired but why not do exactly what they did which is extend the
TERMandTERM_PROGRAMvariables with exactly what they did; addingTERM_SESSION_ID? imo you should replaceWT_TERMINALwithTERM_SESSION_ID, addTERM_PROGRAMandTERM_PROGRAM_VERSIONas there is already a standard and there is zero reason AFAICT to deviate from it.@DHowett-MSFT commented on GitHub (Jan 15, 2020):
It is invalid to consider a terminal that does not set
TERM_PROGRAMandTERM_PROGRAM_VERSIONwrong. It stands, then, that any terminal started from another terminal that has setTERM_PROGRAMwill inherit that value, and confuse all downstream shells.There is no standard for session IDs: at my last check, Apple's Terminal.app used
TERM_SESSION_IDand iTerm2.app usesITERM_SESSION. Perhaps that has changed.@Tyriar commented on GitHub (Jan 15, 2020):
The new terminal sets the value when it starts the process, so no confusion.
Looks like iterm made a mistake and can't break backwards compat (iterm left, terminal.app right):
@Tyriar commented on GitHub (Jan 15, 2020):
Join us
@gerardog commented on GitHub (Jan 15, 2020):
This should be set in both Windows Terminal and the windows built-in ConHost, to minimize the 'false positive' scenarios. I am pretty confident that other terminals will join too (Cmder/ConEmu,etc).
@DHowett-MSFT commented on GitHub (Jan 15, 2020):
There's a problem with that one, too. conhost cannot set an environment variable in the process it's hosting, because it is actually spawned BY the process it is hosting.
That's just not a capability that's afforded to Windows applications. ConEmu supports two launch modes- one where it launches the shell and the conhost and attaches to the conhost, and one where it attaches to an existing conhost. It will not be able to set environment variables in the second case.
There's a lot more issues here than may initially meet the eye.
@eryksun commented on GitHub (Jan 15, 2020):
The Windows team could modify the allocate/attach code in kernelbase.dll to query the console host name and version and set those environment variables.
@garyo commented on GitHub (Jun 1, 2020):
So as a user, to get 24bit support in apps in WSL with Windows Terminal, is this the recommended method:
at least for now?
@DHowett commented on GitHub (Jun 1, 2020):
Definitely not. Client of Terminal will want to use the same means of detecting 24-bit color they were using for years before Windows Terminal came out. The traditional Windows console host has supported 24-bit color for some time now.
@garyo commented on GitHub (Jun 1, 2020):
OK @DHowett -- what is the recommended method for a user then? I have a number of Linux utilities that assume that a 24bit terminal sets
COLORTERM(they may have other methods I don't know about). They do not currently autodetect 24-bit support in Windows Terminal, even though it does support it. When I addCOLORTERM=24bitthey work OK. Is there some alternative method I should use?@DHowett commented on GitHub (Jun 1, 2020):
So,
COLORTERMshould be safe to set for all terminals on Windows as of 1803. No need to checkWT_SESSION, just set it if you're using WSL at all. 😄@garyo commented on GitHub (Jun 1, 2020):
I guess that's what I mean. I have a
.bashrcwhich I use on Windows, Linux (incl WSL) and Mac. I want it to work everywhere. So I can either check that I'm on Windows (but then I still might be in Msys using some term emulator), or just check forWT_SESSION.I do think it would be nice if Windows Terminal would just set
COLORTERMlike many other terminal apps (terminator, iTerm2, konsole, hyper, etc.).@DHowett commented on GitHub (Jun 1, 2020):
Fair request.
I would, though, hope that iTerm/Terminal.app and whatever terminal emulator you use on Linux would support 24-bit color by now. Perhaps if
TERM==xterm-256color, you can set it?@heaths commented on GitHub (Jun 1, 2020):
Would it make more sense, then, to just have conhost and openconsole define
TERMeven if they are "xterm-256color" assumingENABLE_VIRTUAL_TERMINAL_PROCESSINGis enabled?@DHowett commented on GitHub (Jun 1, 2020):
WSL already does this.
@garyo commented on GitHub (Jun 1, 2020):
Sure, that's reasonable. It's likely most terminal emulators claiming 256-color support actually support 24bit at this point.
There's a list at https://gist.github.com/XVilka/8346728 if anyone's interested.
@heaths commented on GitHub (Jun 1, 2020):
WSL does, yes, but that doesn't help my many PowerShell scripts (cross-plat, or Windows-only) where emitting vterm sequences would be easier than chaining
Write-Hostwith various-ForegroundColoror-BackgroundColorparameters.@musm commented on GitHub (Jul 24, 2020):
Just chiming in that in my case, we have a program that probes
COLORTERMand checks if it it's 24-bit or 256 to determine which color mode to enable.I'm still confused/unclear on how to go about this for Windows users?
Should we just uniformly assume a 24-bit terminal if
WT_SESSIONis detected? (That doesn't seem right because 24-bit colors are supported by just launching cmd.exe directly so this test would fail for this case)Or is it better to probe the console mode to confirm ENABLE_VIRTUAL_TERMINAL_PROCESSING is set (not ideal, extra code for this)
@musm commented on GitHub (Jul 24, 2020):
Is it safe to emulate by setting
TERM=xterm-256colorif console mode hasENABLE_VIRTUAL_TERMINAL_PROCESSINGset?@zadjii-msft commented on GitHub (Jul 31, 2020):
That's certainly the
TERMthat we've been aiming to emulate, yea. If you can setENABLE_VIRTUAL_TERMINAL_PROCESSING, then you should assume that the Console (and terminal) will be able to support 256/rgb colors. There's like, 1 build of Windows 10 (RS1, 14393 I think) where that won't work for you, but that was also just about 4 years ago, so I wouldn't worry about that too much.@garyo commented on GitHub (Jul 31, 2020):
Would be great if there were a built-in env var or a way to do this query
without having to write a separate binary. Maybe Windows Terminal could
ship with this little utility?
@tracker1 commented on GitHub (Aug 21, 2020):
More details on color support
@mixmastamyk commented on GitHub (Aug 27, 2020):
Just a note that I've recently discovered that the modern terminfo name for terminals that support direct, aka "true" color is
TERM=xterm-directnotTERM=xterm-256color.In fact a number of terminals have
-directaliases. To compare them:@DHowett commented on GitHub (Aug 27, 2020):
Unfortunately, until we land #4321 we're actually
+indirect😦 (since we use the legacy syntax popularized by a misreading of the direct color spec!)@mixmastamyk commented on GitHub (Aug 28, 2020):
Yes, got it. Since the comment was meant as more of a goal than a current status, it shouldn't be in conflict. Simply a note that, while in most threads folks are mentioning
TERM=*-256color, those profiles have been surpassed for a number of years.@dropsonic commented on GitHub (Nov 24, 2020):
Please also make a PR to
supports-hyperlinksthat is intended to detect embedded hyperlinks support. Right now it is not possible to detect that Windows Terminal has v1.4 or higher so it is not possible to properly implement the terminal&version check.@Delta456 commented on GitHub (Nov 27, 2020):
It will be handy to have
COLORTERMenvironment variable to detect true color support.@potatoqualitee commented on GitHub (Jan 8, 2021):
Excellent and useful additions, thank you so much.
@heaths commented on GitHub (Jan 8, 2021):
@dropsonic why would detection be necessary? If vterm sequences are implemented correctly - and according to discussions for hyperlink support, Terminal is - if older Terminals don't support it hyperlinks will just show up as text (the URL, that is).
@dropsonic commented on GitHub (Jan 10, 2021):
@heaths thanks for pointing it out, will try
@WSLUser commented on GitHub (Jan 20, 2021):
@zadjii-msft Might Unibilium possibly be of help for this?
@DHowett commented on GitHub (Jan 20, 2021):
That license might make it a hard sell.
@WSLUser commented on GitHub (Jan 20, 2021):
Perhaps a refactor that's Windows specific could be used with a new license (including switching to C++ from C). I filed an issue as well but I think it's not likely for them to change it. But who knows, it's a new year, maybe the neovim maintainers will be generous enough to remove that barrier.
@zadjii-msft commented on GitHub (Jan 20, 2021):
That doesn't seem like it would be useful by itself. Couple thoughts:
So I'm gonna say probably no.
@tracker1 commented on GitHub (Feb 23, 2021):
@zadjii-msft The open modifications would only need to be part of the library itself as Lesser GPL (LGPL), and doesn't infect upstream projects. Not sure if/how it would work in terms of how Terminal is made. And I know MS is adverse, as we all are to GPL work, though LGPL is more reasonable.
@jamestalmage commented on GitHub (Apr 6, 2021):
@heaths Feature detection absolutely is necessary.
supports-hyperlinksis a widely used module in the Node.js community for just that purpose. For formatted output (like tables) it's an absolute necessity. For output like that of this module (implementation here), the author is explicitly opting to just not show urls when hyperlinks aren't supported, because their added length would clobber the output. This comment explains the need further.I'm not sure what portion of the 9 million weekly downloads of
supports-hyperlinksare Windows Terminal users, but they're all currently missing out on hyperlinks even though they're supported by their terminal.@tracker1 commented on GitHub (Apr 9, 2021):
I understand the aversion to avoid stuffing environment variables, and that proper capabilities detection is preferred, the old saying of, "Don't Let The Perfect Be The Enemy Of The Good" applies here.
TERM_PROGRAMandTERM_PROGRAM_VERSIONare already widely used fields, and given how muddyTERMhas been, where most terminals are simplyxterm-256coloror similar, trying to "fix" that will likely be more disruptive to existing applications. Terminals evolve, and as bad as it is, knowing the program itself and the version, and being able to do this in a consistent way are more important than trying to create a better solution.Capabilities lookups may indeed lag here... and even then, there are often cases where a very specific point release of an application may have issues... Broken list api in IE 5.0.0, or broken JSON parser in IE 8.x for example. As developers we need to be able to work around these issues, and not knowing definitively the application and the version in a consistent way is just plain bad.
I know there is
WT_SESSIONokay, now we know the terminal in a completely different way than any other terminal in existence. And we still do emphatically NOT know the version. I cannot for the life of me figure out why this feature request is so controversial or why it has sat here for the better part of two years. This could easily have been a solved problem with those affected able to make their adjustments and move on by now.Tagging: @DHowett-MSFT @zadjii-msft
@orta commented on GitHub (Jan 8, 2022):
In case you want more concrete examples of needing this, I'm midway through adding some hyperlinks in the output from the TypeScript compiler but can't reliably support Windows Terminal without being able to do a version check from inside the process (for other terminals I use
TERM_PROGRAM_VERSION.) Given that the support is relatively new and there's probably a non-trivial number of older installs around, we'd end up giving them a bad experience.@heaths commented on GitHub (Jan 10, 2022):
@orta depending on how you're linking, you may not need to check. See my comment above. That may not work in all cases, though; and, don't get me wrong, I 💯 agree we need some way of checking TERM support, though I understand from this thread there's no good standard to implement. Cue xkcd's comic on inventing a new standard!
@axelfontaine commented on GitHub (Feb 17, 2022):
WT_SESSIONalso doesn't work reliably in Win11 x64 with Windows Terminal set as default.To reproduce, press the Windows key to open start, then type
cmd+ enterThis now opens a Windows Terminal cmd.exe tab via
%USER_PROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools\Command Prompt.lnkwhereWT_SESSIONis not set.@zadjii-msft commented on GitHub (Feb 17, 2022):
This is a great example of why I wasn't in love with the env var solution in the first place. It's never going to be totally reliable.
The defterm scenario is never going to work with
WT_SESSION. When the Terminal is invoked for a defterm connection,cmd.exeis already running. At this point, it's environment variables are already set. It's started, so there's nothing WT can do to change them now. Then, the OS tries to create a console to host thecmdprocess.conhostdoes some work, and hooks up thecmd.exeto the Terminal (or some other terminal!). The Terminal can only add theWT_SESSIONvariable when WT is the parent, launchingcmd.exedirectly.@garyo commented on GitHub (Feb 17, 2022):
OK, so env vars won't work in all cases. Is there another option? Perhaps Windows Terminal could ship with a small exe that, when run, checks how it's being run (parent processes, process groups, or some other OS method) and returns on stdout a JSON list of capabilities, version number, etc.? Just trying to be creative here.
@j4james commented on GitHub (Feb 17, 2022):
Exactly which capabilities do you need to detect? There should already be standard escape sequences for detecting most features that apps might be interested in. We don't support all of those sequences yet, but that's something I'm hoping to get to eventually.
@axelfontaine commented on GitHub (Feb 17, 2022):
@j4james ANSI escape code and emoji rendering support.
@Jaykul commented on GitHub (Feb 17, 2022):
The thing is, it does:
wt --versionis a thing, but it pops up a GUI 🤣@j4james commented on GitHub (Feb 17, 2022):
@axelfontaine ANSI escape codes you can detect by sending something like a CPR query and see if you get a response. Trying to detect "emoji rendering" is probably a lost cause.
@Jaykul I'm not sure how you'd expect that to help you anyway. Determining the version number of wt on the host machine tells you nothing about the capabilities of the client terminal.
@axelfontaine commented on GitHub (Feb 17, 2022):
@j4james "Running under WT?" is a good enough emoji rendering support detection algorithm as far as I'm concerned.
@zadjii-msft commented on GitHub (Feb 17, 2022):
maybe your algorithm should be
return true😝(admittedly, I saved the file as UTF-8 then tried printing it to CP437 the first time, so that's on me)
@DHowett commented on GitHub (Feb 17, 2022):
Yup, this is an excellent example of a principle I've been talking about across this repository! In the fullness of time, "Are we running under WT?" will give you an incomplete and incorrect answer as to whether various things are supported on Windows. There are already folks in the wild who detect
WT_SESSIONand use that to determine whether to emit direct RGB color, for example... when the console has supported those colors since 2018. Discoverability is hard, but the simple fact remains that the things we do for the Terminal ultimately help the console that ships inside Windows as well. 😄(Specifically, emoji rendering works thanks to alabuzhev working on the GDI engine; we would not have gotten to it without his help.)
@axelfontaine commented on GitHub (Feb 17, 2022):
@zadjii-msft I am well aware a
.cmdfile is still required to setchcp 65001before launching my app. After that I currently detect whetherWT_SESSIONis 36 chars long. If that fails, then it's fallback to no-emoji no-ansi rendering. My comment was primarily about decreasing the number of false negatives to offer the improved experience to as many users as possible.@zadjii-msft commented on GitHub (Feb 17, 2022):
Sorry, I wasn't clear. The Window in my gif is conhost, not the Terminal. There's no
WT_SESSIONthere, because it is not the Terminal. That's just the console. Emoji can work in the console as well as the terminal. That's part of the whole design of the Terminal - a most of the improvements we make to the Terminal's buffer and internals are things that the console can benefit from as well.@heaths commented on GitHub (Feb 17, 2022):
Is a perfect solution necessary? It's clear from the thread that there's not really an established pattern, but
TERMandCOLORTERMcome close. Close enough? For most indented purposes, seems "yes".Running some EXE as suggested above or relying on Windows- or Windows Terminal-specific solutions don't make scripts portable, or at least make them harder to write (would always need a precondition of
WT_SESSIONwhich, as @zadjii-msft points out above, also isn't accurate).Seems the sooner a solution is added that is close to what most other terminals do, the less workarounds get invented that might be even worse.
@j4james commented on GitHub (Feb 17, 2022):
@heaths If you're just trying to detect true color support, you should be able to use the standard method documented here:
https://gist.github.com/XVilka/8346728#querying-the-terminal
I believe that should be supported in Windows Terminal from version 1.12.
@heaths commented on GitHub (Feb 18, 2022):
My original reason for jumping onto this thread was to find an easy way a script or program can query. Even the suggested gist - which I had found previously - doesn't always work. Even if you replace
:with;in Windows Terminal, the response you get back isn't the same:The gist shows "r;48" instead of what Windows Terminal reports back, "r0;48". So depending on what people are checking for when reading back, it seems to vary from terminal to terminal. Whether you use
:or;certainly does. For example, using:in WT gives back^[P1$r0m^[\, which indicates WT doesn't support truecolor.This makes it more difficult to write portable shell scripts as well, where an env var is pretty straight forward to use.
@eryksun commented on GitHub (Feb 18, 2022):
When a console is allocated on the client side, the internal function
ConsoleCreateConnectionObject()callsNtCreateFile()to open the connection to conhost. The connection request triggers the handoff in conhost. After connecting, the client side could callNtDeviceIoControlFile()with an IOCTL that requests session environment variables that need to be set (e.g. "TERM", "WT_SESSION", "WT_PROFILE_ID", "WSLENV"). The base API could also make this IOCTL when the console connection is inherited, or when attaching viaAttachConsole(). This would ensure that clients always start with relevant session environment variables. The ConPTY API would include functions to get and set these session environment variables in the console server.For handoff, the delegated console (openconsole) would need to obtain the session environment variables from the delegated terminal when it calls
handoff->EstablishPtyHandoff(...), which could be either from an out parameter or a subsequent COM call. This guarantees their availability when the base API requests them.@DHowett commented on GitHub (Feb 18, 2022):
I actually really like this. We've been thinking about what it would mean to extend the Console API surface, too, with both inbox consumers (conclnt) and out-of-box ones. The Windows release cycle gives us a bit of trouble, but since DefTerm is locked behind Windows updates as well ... it isn't as much of a problem. Interesting.
@Jaykul commented on GitHub (Feb 18, 2022):
@heaths wrote:
The leading
0;is the SGR reset which "returns all attributes to the default state prior to modification".The response for
DCS $ q Pt STaccording to ctlseqs is supposed to be:DCS 1 $ r Pt STWhen the query
Ptismyou're going to get the SGR back as thePt. Windows Terminal is returning:0;48;2;1;2;3mwhich is the reset plus the background. Some other terminals may leave off the reset. For our purposes, you can (should) ignore it. You set the default background (48), so what you're trying to read is the value of 48.I wrote Test-RgbMode for example, but I don't have a wide test base to verify it works.
@heaths commented on GitHub (Feb 18, 2022):
Thanks for the explaining the 0 there. In hindsight I probably should've realized that (I tend to reset colors to be sure myself), but wasn't entirely sure what the printed sequence was representing.
But looking at your gist shows the complexity that any script would have to do in Windows Terminal as opposed to most other terminals with a combination of
TERMandCOLORTERM. Given the acquisition model for Windows Terminal (most people probably get it through the Windows Store) and update push model, is there any big downside of assuming the vast majority of customers have the latest andTERMandCOLORTERMare enough? My concern is more about portability of scripts with common terminals and less about 100% accuracy. Wouldn't you agree that the vast majority of devs wanting to detect capabilities are probably most interested in terminal colors? Sure there's some one-offs for detecting if hyperlinks are supported, etc., but given that most customers would have the latest WT simply checkingTERMfor, say, "xterm-256color" or whatever it would be set to should be approximate.Even the detection mechanism you demo above has variants for terminals like using
:instead of;so the logic becomes even more complicated. It's all possible, of course, but you start turning otherwise small shell scripts into much larger ones.@j4james commented on GitHub (Feb 18, 2022):
@heaths Note that there are three different truecolor formats, and terminals don't necessarily support all of them. If
COLORTERMis set to truecolor or 24bit, that indicates that the terminal might support some form of truecolor, but it doesn't tell you which formats will work. It's probably reasonable to assume the semicolon format, but that's not guaranteed.No - that's indicating that WT doesn't support the colon format, which is exactly the point. A
COLORTERMvariable wouldn't tell you that.That said, if you're happy with the all the limitations of environment variables, that's fine. I just want to make sure you are actually aware of those limitations.
@heaths commented on GitHub (Feb 18, 2022):
I appreciate the limitations, yes. Not only have I been following this thread, but working with @DHowett offline with some GitHub CLI (and related modules) issues, along with a couple GitHub developers. The main reason I brought up my concern/question above was questioning whether or not the limitations of env vars like
TERMandCOLORTERMare worth it for the vast majority of cases. I posit: probably not. In scenarios where those limitations may be problematic, certainly app/script devs can query caps from the terminal as you've suggested - dealing with all the portability issues across shells.Scenarios where env vars are probably good enough would be colors, I would think. Let's say that you only set
TERM=xterm-256colorand some shell decides to use 256 indexed colors instead of truecolor even though they could. Is that detrimental? Or if they merely checkTERMfor "xterm" to assume it supports OSC 8 (hyperlinks), WT would as long as they have a fairly recent (1.10?) version, which given Windows Store's (eventual) push model for updates is likely, especially as more time passes.IMO, I just don't see a great reason to avoid using common
TERMandCOLORTERMeven if they aren't 100% correct. For simple scenarios they should be good enough, as they have been even before Windows Terminal despite some differences across various terminals. When it matters, devs should be encouraged to query caps on the terminal. Both can be offered.@tracker1 commented on GitHub (Mar 9, 2022):
Not for people actually making terminal programs that won't always be run in windows... not to mention there are different terminals for windows itself. WT_* may indicate that it's "Windows Terminal" that said it's a horrible experience when trying to support different terminals, or possibly even trying to create something that can detect features.
It's very similar to at least being able to get the application name (
TERM_PROGRAM) and the version (TERM_PROGRAM_VERSION) so that you can handle, work around or determine specific implementation bugs, in a consistent way with other environments.Specific, similar example.... Internet Explorer 5.0.0 had a very specific bug in which it implemented a new interface for managing the options in a
<select>element that was fixed in 5.0.1 ... but at the time, it was written to every Windows 2000 and Office 2000 cd... that's an example of a very specific work around... that said, it happens more often than most would like to think.In this case, the terminal is effectively a browser for a command line application, including the shell environment.
Some features that concern me that would be nice to be able to determine in a consistent way....
Doing so in the most consistent way, termcap library support for WT, etc. But short of having at LEAST the TERM_PROGRAM, it's not at all consistent with other terminals.
For that matter, maybe a settings option for adding/setting/overriding custom environment variables, so the user can CHOOSE to add appropriate options for their environment (wsl, ssh, etc).
@j4james commented on GitHub (Mar 9, 2022):
You should be able to determine this with a
DECRQSSquery.This could probably be detected by ouputting a UTF-8 character and then measuring the consumed space with a
DSR-CPRquery.You can determine Sixel image support from the
DA1report.Not possible yet, but I'm hoping to persuade other terminals to use
DA1for this to.Not sure what you mean.
If you mean you want to determine the size of the screen, and whether you can resize the window, a
DSR-CPRquery would probably suffice.@heaths commented on GitHub (Mar 9, 2022):
The issue I was trying to raise in the last couple comments above, though, is why writing to a TTY and checking the results would be the most accurate way to determine capabilities, are you expecting that every program and, more important, every shell script (especially those that want to remain simple but maybe write out some colors) have to write to the TTY, read back, then clear the line just to emit some colored output? The environment variables like
TERM,COLORTERM, andTERM_PROGRAMmay not be perfect but I imagine for most cases are good enough. So why not support both?@j4james commented on GitHub (Mar 9, 2022):
@heaths I'm not expecting anyone to do anything. I'm just saying there are queries you can use if you need an accurate way to determine those features. If asynchronous queries are not appropriate for your application, or you don't particularly care whether your feature detection is accurate or not, then you can of course use any other method you prefer. As I said before, if you're happy with the limitations of environment variable, that's fine - whatever works best for you.
@tig commented on GitHub (May 4, 2023):
Hi all, maintainer of https://gitub.com/gui-cs/Terminal.Gui here.
We would really like a way to ask terminals (not just Windows Term) if a specific unicode glyph is supported at runtime.
The idea being, we have to choose a least-common-denominator glyph for things like the one used for checkboxes. In this example, we choose the square root symbol as it empirically works on every terminal we've tried, with every font we've tried, where other "check mark" symbols do not.
What we'd like to do is emit a DECRQM asking, "Can you render this pretty glyph"? If the answer is no, we'll fall back to our default. If the answer is yes, we'll use the prettier glyph. We could also do this via querying an environment var or something, but it seems to me the most cross-platform way to do this is to extend DECRQM to support such a query?
I know it is possible to ask (at least on Windows) if a particular font supports a particular glyph.
I found this Issue in my searching for existing solutions to this and it seems like a good place to start. Let me know if you have suggestions on how to proceed further. My dream (big dreamer here) is other terminals will also implement such a thing in a standard way...
@j4james commented on GitHub (May 4, 2023):
@tig If I remember correctly, there was a some discussion a while back about coming up with a terminal standard for querying Unicode glyph support. I may be misremembering the details, and I haven't been able to track down the thread where it was discussed, but I think it would probably have covered your use case if it were ever implemented.
That said, this isn't something that Windows Terminal could easily implement, even if such a standard did exist, because these query sequences are handled in conhost, which doesn't know anything about the fonts that the actual conpty client is using. So this might be one of those things that would only work with a pass-through mode (#1173).
In short, it's possible this might be feasible one day, but unlikely in the near future.
@tusharsnx commented on GitHub (Jul 17, 2023):
It's clear that setting
$TERMis not sufficient when an application wants to know if terminal supportsFeatureX.I guess we can have a terminfo for WT, for all kinds of *NIX applications. We can always be
TERM="xterm-16color"or even TERM="" (whatever the safest option is) and totally support extra capabilities by announcing it via terminfo.User has to do one time installation of WT's terminfo on their favourite distro (by curl and install) to support all new capabilities. If that's not possible for whatever reason, you are pretty much using the same terminal what you get today without any modifications.
This is supposed to done by terminals and not ConHost or ConPTY. For any terminal out there, if they want to support all capabilities of ConHost then they should need to announce it. ConHost won't do it for them. Applications should just behave the way they do right now when terminfo is not found or they don't recognise the terminal.
Remaining problems:
@jwortmann commented on GitHub (Jun 24, 2025):
Hello, does anybody know whether there is a reliable way to check for Sixel graphics support in Windows Terminal (Sixel support was added a while ago)? Just checking for the
WT_SESSIONenvironment variable doesn't seem sufficient due to the beforementioned limitations (e.g. unknown version number / inherited environment variables if another shell was started from within WT).I've tried using the
ESC[0cescape sequence to ask for the device attributes, but the problem I'm facing in Windows Terminal is that the result doesn't get printed to stdout, but instead somehow ends up in the prompt line instead. For example using PowerShell Core:Is this a bug or intentional? Is there any way to read/capture this result, so that I can check whether it contains a
4(for Sixel support)? On Linux/macOS terminals, the result of that control sequence gets printed to stdout, so a program can easily work with that.@KalleOlaviNiemitalo commented on GitHub (Jun 24, 2025):
@jwortmann, imagine you had a hardware terminal connected to an old computer with a serial cable. The program in the computer writes the DA - DEVICE ATTRIBUTES request to stdout and it goes over the wire to the terminal. The terminal then responds with a report and the program can read that from stdin as if the user had typed it in. That's the principle being emulated by Windows Terminal. Now if your PowerShell script only outputs the DA and finishes without waiting for the report and reading it, then the report is instead read by the line editor (PSReadLine?) and apparently mistreated as a series of typed characters.
I don't know how that could happen.
@jwortmann commented on GitHub (Jun 24, 2025):
@KalleOlaviNiemitalo Thank you for the explanation! Indeed I wasn't aware how querying the device attributes works under the hood and my claim about
was probably based on wrong assumptions. In fact, I did not try this explicitly on Linux/macOS, so what I wrote above might be incorrect. However, there still seems to be a difference how it is handled between these operating systems, when compared to Windows.
As far as I can tell, the program that I use (coded in the Julia programming language) waits and does read the result from the
stdoutstream and it seems to work well on Linux/macOS, but not on Windows (Terminal). The corresponding code is at0602d28494/src/terminaltools.jl (L55-L58)and therein thettyvariable is set to thestdoutstream. Simplified it looks like this:Apparently it does not work in Windows Terminal or in Mintty (Cygwin).
So if it is indeed expected that the DA report gets passed to the stdin stream, I'm puzzled why it works differently on Linux and Mac.
Do you maybe know of an example (e.g. PowerShell command/script) how to wait for and read the DA report, so that it is not mistreated as typed characters and ends up in the stdin stream?
Edit: Thanks for the solution linked below 👍
@j4james commented on GitHub (Jun 24, 2025):
@jwortmann I shared a PowerShell example in https://github.com/JuliaIO/Sixel.jl/issues/30#issuecomment-3000983372
@KalleOlaviNiemitalo commented on GitHub (Jun 24, 2025):
The difference may be that
readavailable(stdout)from working.@dodexahedron commented on GitHub (Aug 2, 2025):
Note (also relevant to #18382):
Since 2024-10-26, ncurses has a terminfo definition that works very well with Windows Terminal over SSH to Linux, including full 24-bit color and comprehensive Unicode support.
Link to terminfo db definition
Link to source commit
It is defined as a combination of the
xterm+directterminfo (which also works fairly well with modern Windows Terminal all by itself) and thems+terminalterminfo, which is itself based on a combination of other terminfos and a few dedicated tweaks.Defining
Env:TERMin my powershell profile asms-terminal-direct, and addingSendEnv TERMto my~/.ssh/configfile mae linux ssh sessions beautiful.Additionally, setting
Env:COLORTERMtotruecolorand addingCOLORTERMto theSendEnv(plus adding it toAcceptEnvon the server, if necessary) makes applications that look for that variable behave well, too (one example isbtop, which looks glorious when these two variables are set this way).The ms-terminal and ms+terminal terminfos have been in there even longer, and work quite nicely, too - just without 24-bit true color.