Batsh
zsh-syntax-highlighting
Batsh | zsh-syntax-highlighting | |
---|---|---|
8 | 72 | |
4,281 | 19,094 | |
0.1% | 0.9% | |
2.8 | 5.9 | |
about 1 year ago | about 1 month ago | |
OCaml | Shell | |
- | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Batsh
-
Show HN: Just.sh – compiler that turns Justfiles into portable shell scripts
https://github.com/batsh-dev-team/Batsh
https://github.com/tdenniston/bish
(Just fyi. I've been collecting links to similar things because of Reasons).
-
“Exit Traps” Can Make Your Bash Scripts Way More Robust and Reliable
I wish there was a nicer shell scripting language that simply transpiled to Bash and would generate all this boilerplate code for me. There is https://batsh.org/ which has a nice syntax but it doesn't even support pipes or redirection, making it pretty worthless for shell scripting. I haven't found any other such scripting languages.
-
If Bash had more intuitive syntax and wasn't so annoying to use, would it have made scripting languages more popular for more tasks earlier on?
There are some languages that compile into bash like Batch. Shell commands can also be called from Python code using this (never tried it): https://plumbum.readthedocs.io/en/latest/index.html
-
Make bash script executable on Android and Windows
Maybe https://github.com/batsh-dev-team/Batsh
- Any tips to convert bat scripts to sh?
-
s/bash/zsh/g
Not really what you're asking for, but a language that compiles to bash for portability reminded me of Batsh [0], a C-like language that compiles to bash for Linux/Mac and batch for Windows.
[0] https://github.com/batsh-dev-team/Batsh
-
[QUESTION] Cross-platform scripting
There used to be something called Batsh as well but no longer seems to be actively developed
-
Why Create a New Unix Shell? (2021)
There are a couple projects that provide a language that compiles to Bash, which gets around Oil's portability problem somewhat. Bish and Batsh come to mind.
zsh-syntax-highlighting
-
Setting up a MacBook for development in 2024
brew install fzf # for fuzzy find files, commands, etc brew install starship $(brew --prefix)/opt/fzf/install git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting # syntax highlight for zsh git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions # smart autosuggestions for zsh echo 'eval "$(starship init zsh)"' >> ~/.zshrc
-
Quickest path to a decent zsh setup?
# run this git clone https://github.com/zsh-users/zsh-syntax-highlighting $ZSH/custom/zsh-syntax-highlighting # add this to your .zshrc plugin=(... zsh-syntax-highlighting)
-
Arch Installation for Beginners
$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting $ git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
-
Configurando Alpine Linux, tmux e neovim no WSL2 - parte 1
sudo git clone https://github.com/zsh-users/zsh-syntax-highlighting.git echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
- better than admitting I'm too too lazy to correct the command
-
[Question] What are the best plugins for zsh ?
Two by far the most popular plugins are zsh-syntax-highlighting and zsh-autosuggestions. They are of high quality and quite useful.
-
Configuração do Windows para desenvolvimento
echo "Installing zsh-autosuggestions" git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions echo "Installing zsh-syntax-highlighting" git clone https://github.com/zsh-users/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting echo "Installing asdf" git clone https://github.com/asdf-vm/asdf.git ~/.asdf
-
Why Oh My ZSH is so cool?
Syntax highlighting
-
ZSH + Oh My ZSH! on Windows with WSL
git clone https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
-
Wrote a "plugin manager" shell function. Any ideas for improvement?
if (($+commands[git])); then use_plugin() { local root_dir="${XDG_DATA_HOME:-$HOME/.local/share}/zsh/plugins" local plugin_name=${1:t} # grabbing the 5th field works for a Github url, not necessarily for every url. local plugin_dir=$root_dir/${1//[/:]/_} if ! [[ -d $plugin_dir ]] echo $EPOCHSECONDS > $plugin_dir/update_timestamp # don't continue if cloning failed git clone --depth 1 "$1" "$plugin_dir" || return local timestamp read -r timestamp < $plugin_dir/update_timestamp if ((EPOCHSECONDS - timestamp > 864000)); then # don't update timestamp if pull failed git -C $plugin_dir pull && echo $EPOCHSECONDS > $plugin_dr/update_timestamp # Match common source filenames local file for file in ($plugin_name|${plugin_name:l}).(plugin.zsh|zsh|zsh-theme)(N); do source $plugin_dir/$filename && break done } use_plugin 'https://github.com/zsh-users/zsh-autosuggestions' use_plugin 'https://github.com/zsh-users/zsh-syntax-highlighting' fi
What are some alternatives?
linode-caddy - Ansible role that sets up a web server running Caddy on Linode.
fast-syntax-highlighting - (Short name F-Sy-H). Syntax-highlighting for Zshell – fine granularity, number of features and multiple shipped themes.
fzf-tab - Replace zsh's default completion selection menu with fzf!
ohmyzsh - 🙃 A delightful community-driven (with 2,300+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.
zsh-abbr - The zsh manager for auto-expanding abbreviations, inspired by fish shell.
ble.sh - Bash Line Editor―a line editor written in pure Bash with syntax highlighting, auto suggestions, vim modes, etc. for Bash interactive sessions.
zgenom - A lightweight and fast plugin manager for ZSH
zsh-autosuggestions - Fish-like autosuggestions for zsh
scripting-field-guide - A booklet on mid-advanced scripting techniques
starship - ☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!
zplug - :hibiscus: A next-generation plugin manager for zsh
oh-my-bash - A delightful community-driven framework for managing your bash configuration, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.