{"repo":"anki-code/xontrib-sh","free":true,"listed":false,"github":"https://github.com/anki-code/xontrib-sh","clone":"git clone https://github.com/anki-code/xontrib-sh.git","description":"Paste and run commands from bash, zsh, fish, tcsh, pwsh in xonsh shell.","language":"Python","stars":65,"topics":["xonsh","zsh","bash","fish","shell","xontrib","sh","dash","tcsh","powershell"],"license":"MIT","category":"cli-tools","readme_excerpt":"Paste and run commands from bash, fish, zsh, tcsh in xonsh shell . If you like the idea click ⭐ on the repo and and tweet . Install Usage Start the line with ! (exclamation mark with space) then paste the sh-compatible commands after it and run. The commands syntax will be tested in the shells from list (if installed) and the commands will be run in the first matching shell. By default list of shells contains bash and sh. The commands will be executed in the environment that will be inherited from current but if the commands modify the environment there will no changes in source xonsh environment. To set the list of shells use environment variable before loading the xontrib: Also you can set the shell explicitly i.e. !bash or !b (the first letter of the shell). The main use case The main use case of xontrib-sh is when you copy and paste the sh-commands from some article or instruction and this commands are environment agnostic and you want to run it without rewriting it on xonsh or run sh-shell. For example you've found snippet of bash commands that check existing of curl : You hesitate how xonsh will execute this and you're absolutely right there will be syntax error. To run this just start with ! or !b or !bash and paste the commands. As result you'll see the right message. Examples Bash brace expansion Multiline loop Use environment variables to pass values from xonsh to sh Known issues Determining the shell on short command In case of usage many different shells the detec","default_branch":null,"files":null,"tree":[],"storefront":"/r/anki-code","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/anki-code/xontrib-sh/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}