Title: Using Fire with Xonsh shell · Issue #655 · google/python-fire · GitHub
Open Graph Title: Using Fire with Xonsh shell · Issue #655 · google/python-fire
X Title: Using Fire with Xonsh shell · Issue #655 · google/python-fire
Description: Hey! Thank you for Fire! I'm trying to use Fire with Xonsh shell. For example I want to have a CLI to operate with @.env - xonsh session environment that has PATH, LS_COLORS, etc. Start from making an alias: @.env # xonsh.environ.Env({'U...
Open Graph Description: Hey! Thank you for Fire! I'm trying to use Fire with Xonsh shell. For example I want to have a CLI to operate with @.env - xonsh session environment that has PATH, LS_COLORS, etc. Start from making...
X Description: Hey! Thank you for Fire! I'm trying to use Fire with Xonsh shell. For example I want to have a CLI to operate with @.env - xonsh session environment that has PATH, LS_COLORS, etc. Start from ma...
Opengraph URL: https://github.com/google/python-fire/issues/655
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Using Fire with Xonsh shell","articleBody":"Hey! Thank you for Fire!\n\nI'm trying to use Fire with [Xonsh shell](https://xon.sh/). For example I want to have a CLI to operate with `@.env` - xonsh session environment that has `PATH`, `LS_COLORS`, etc.\n\nStart from making an alias:\n\n```xsh\n@.env\n# xonsh.environ.Env({'USER':'pc' ...\n\n@aliases.register\ndef _env_cli(args):\n echo @(@.env.keys())\n\nenv-cli\n# PATH LS_COLORS ...\n```\n\nLet's add more fire:\n\n```xsh\n@aliases.register\ndef _env_cli(args):\n \"\"\"Alias that represents xonsh session environment as CLI.\"\"\"\n @.imp.fire.Fire(@.env, command=args, name=$__ALIAS_NAME)\n\nenv-cli\n# InternalEnvironDict({'USER':'pc' ...\n\n# Nice! But\n\nenv-cli --help\n# INFO: Showing help with the command 'env-cli -- --help'.\n# Exception in thread {'cls': 'ProcProxyThread', 'name': 'Thread-13', 'func': FuncAlias({'name': 'env-cli', 'func': '_env_cli', 'return_what': 'result'}), 'alias': 'env-cli', 'pid': None}\n# Traceback (most recent call last):\n# File \"/Users/pc/.local/xonsh-env/lib/python3.12/site-packages/xonsh/procs/proxies.py\", line 470, in run\n# r = run_with_partial_args(\n# ^^^^^^^^^^^^^^^^^^^^^^\n# File \"/Users/pc/.local/xonsh-env/lib/python3.12/site-packages/xonsh/cli_utils.py\", line 383, in run_with_partial_args\n# return func(**kwargs)\n# ^^^^^^^^^^^^^^\n# File \"/Users/pc/.local/xonsh-env/lib/python3.12/site-packages/xonsh/aliases.py\", line 99, in __call__\n# return run_alias_by_params(\n# ^^^^^^^^^^^^^^^^^^^^\n# File \"/Users/pc/.local/xonsh-env/lib/python3.12/site-packages/xonsh/aliases.py\", line 565, in run_alias_by_params\n# return func(**kwargs)\n# ^^^^^^^^^^^^^^\n# File \"\u003cstdin>\", line 4, in _env_cli\n# File \"/Users/pc/.local/xonsh-env/lib/python3.12/site-packages/fire/core.py\", line 157, in Fire\n# Display(output, out=sys.stderr)\n# File \"/Users/pc/.local/xonsh-env/lib/python3.12/site-packages/fire/core.py\", line 169, in Display\n# console_io.More(text, out=out)\n# File \"/Users/pc/.local/xonsh-env/lib/python3.12/site-packages/fire/console/console_io.py\", line 99, in More\n# signal.signal(signal.SIGINT, signal.SIG_IGN)\n# File \"/Users/pc/.local/xonsh-env/lib/python3.12/signal.py\", line 58, in signal\n# handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))\n# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n# ValueError: signal only works in main thread of the main interpreter\n```\n\nCould you please help to understand what I'm doing wrong?\nThanks!","author":{"url":"https://github.com/anki-code","@type":"Person","name":"anki-code"},"datePublished":"2026-03-20T12:39:16Z","url":"https://github.com/google/python-fire/issues/655"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ca47718d-c20b-c8ef-5752-f622c5a11644 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BFB8:34BCDE:DF42E9:124BD30:6AFFF00E |
| html-safe-nonce | 54c28902cb4f0bc6da29586300713c5057d2e1cf5a153b05b35dc8194eed54e7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRkI4OjM0QkNERTpERjQyRTk6MTI0QkQzMDo2QUZGRjAwRSIsInZpc2l0b3JfaWQiOiI3NzIzNzkxNjg0Nzg5NTk2MTc0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 99f82a8bc3651ceee45cb338dc4da94b6e9dddb26f1d603c331f205b357384fa |
| hovercard-subject-tag | issue:4107659951 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/google/python-fire/655/issue_layout |
| twitter:image | https://opengraph.githubassets.com/eedf7fcfb18be3a830785c304d84a58b18805bbfcd4eab3da55561c104fa9c50/google/python-fire/issues/655 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/eedf7fcfb18be3a830785c304d84a58b18805bbfcd4eab3da55561c104fa9c50/google/python-fire/issues/655 |
| og:image:alt | Hey! Thank you for Fire! I'm trying to use Fire with Xonsh shell. For example I want to have a CLI to operate with @.env - xonsh session environment that has PATH, LS_COLORS, etc. Start from making... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anki-code |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| turbo-cache-control | no-preview |
| go-import | github.com/google/python-fire git https://github.com/google/python-fire.git |
| octolytics-dimension-user_id | 1342004 |
| octolytics-dimension-user_login | |
| octolytics-dimension-repository_id | 82729529 |
| octolytics-dimension-repository_nwo | google/python-fire |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 82729529 |
| octolytics-dimension-repository_network_root_nwo | google/python-fire |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 16a11879678aaf97e2a42c33ee70830aa084fa37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width