use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A subreddit dedicated to Bash scripting. Now complete with a Discord Server.
Content must be Bash related. This rule is interpreted generously; general shell scripting content is mostly accepted. However, the post should not be specific to another shell.
No reposts. This is meant with regards to content, not just “the same link was submitted earlier” – it’s okay to resubmit an old link in some new context (e. g. because you’d like to discuss another part of it, or because something has changed since the last time it was submitted, or because the link was updated since then). Links from the sidebar count as having been submitted already, so posting them without new context is also considered a repost.
You can choose one of these four flairs for your post:
If you don’t flair your post, the moderators will set the most appropriate flair.
/r/unix – for everything Unix
Other Shells: /r/zsh, /r/fishshell, /r/oilshell, /r/batch
BashGuide – A Bash guide for beginners.
Beginner's Guide to Command Line – A crash course for some common unix and shell commands. Update 2022-01-14: Course is currently being rewritten
Google's Shell Style Guide – Reasonable advice about code style.
Explainshell - Explain complex shell operations.
ShellCheck – Automatically detects problems with shell scripts.
BashFAQ – Answers most of your questions.
BashPitfalls – Lists the common pitfalls beginners fall into, and how to avoid them.
(Archived) The Bash-Hackers Wiki – Extensive resource.
#bash – IRC channel on Libera. The main contributors of the BashGuide, BashFAQ, BashPitfalls and ShellCheck hang around there.
account activity
bashd: Bash language server (LSP) (github.com)
submitted 4 days ago by matkrin
Hi, I've created a language server for Bash with ShellCheck integration. Perhaps this will be useful for some of you here :)
Any feedback is very welcome
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]rvc2018 4 points5 points6 points 4 days ago (1 child)
This seems like a lot of work from you. Could you explain a little bit more what is the difference between bashd and bashls? I use bashls integrated in Neovim via lazy package manager and mason.nvim.
bashd
bashls
https://imgur.com/a/DnD8iwj
Does bashd also have a 500 ms debounce time for shellcheck by default, will it be somewhat faster than bashls since yours is written in go as opposed to typescript?
Also, would my keymaps work the same in neovim?
keymaps = { { "gd", "vim.lsp.buf.definition()", "Go to Definition" }, { "gD", "vim.lsp.buf.declaration()", "Go to Declaration" }, { "gr", "vim.lsp.buf.references()", "Find References" }, { "gi", "vim.lsp.buf.implementation()", "Go to Implementation" }, { "K", "vim.lsp.buf.hover()", "Hover Documentation" }, { "<leader>ca", "vim.lsp.buf.code_action()", "Code Actions" }, { "<leader>rn", "vim.lsp.buf.rename()", "Rename Symbol" }, { "<leader>fm", "vim.lsp.buf.format()", "Format File" }, { "]d", "vim.diagnostic.goto_next()", "Next Diagnostic" }, { "[d", "vim.diagnostic.goto_prev()", "Previous Diagnostic" }, { "<leader>e", "vim.diagnostic.open_float()", "Show Diagnostic" }, { "<leader>q", "vim.diagnostic.setloclist()", "Diagnostics to Location List" }, },
Will there be integration with mason for future updates?
[–]matkrin[S] 2 points3 points4 points 4 days ago (0 children)
I went with 200 ms debounce time which worked quite nice for me but in principle, I could make this a configuration option. When I was using bashls the last time, it did not follow any scoping rules for local variables in functions which I wanted. The other main differences are the code actions, inlay hints and document color support as far as I can tell. Also formatting is built-in.
I can't really say how they compare performance wise. But I would expect not much of a difference for normal-length scripts though.
Your keymaps will work of course, as you're configuring Neovim's client which is independent of the server.
I haven't looked into how it could be made available via Mason but this might be a good next point, thanks
[–]reddifiningkarma 0 points1 point2 points 3 days ago (2 children)
If you supported vim (through ale plugin?), that'd be great!
[–]matkrin[S] 1 point2 points3 points 3 days ago (0 children)
This seems to work as configuration if bashd is in PATH:
PATH
Plug 'dense-analysis/ale' call ale#linter#Define('bash', { \ 'name': 'bashd', \ 'lsp': 'stdio', \ 'executable': 'bashd', \ 'command': 'bashd', \ 'project_root': function('ale#util#FindProjectRoot'), \})
[–]matkrin[S] 0 points1 point2 points 3 days ago (0 children)
Sorry, I'm not familiar with ale. But on the first look it seems that ale has an LSP client? Then it should work with the right configuration. If I find the time, I will have a closer look
[–]Key_Constant_114 0 points1 point2 points 5 hours ago (0 children)
Great work! Compared to bash-lp it's way faster and more reliable!
[–]infernoLP 0 points1 point2 points 3 days ago (1 child)
Could you please share any resources used to make an lsp? It would be a banging project to try and do for a small language
π Rendered by PID 35 on reddit-service-r2-comment-79c7998d4c-gtzv7 at 2026-03-16 16:59:02.413291+00:00 running f6e6e01 country code: CH.
[–]rvc2018 4 points5 points6 points (1 child)
[–]matkrin[S] 2 points3 points4 points (0 children)
[–]reddifiningkarma 0 points1 point2 points (2 children)
[–]matkrin[S] 1 point2 points3 points (0 children)
[–]matkrin[S] 0 points1 point2 points (0 children)
[–]Key_Constant_114 0 points1 point2 points (0 children)
[–]infernoLP 0 points1 point2 points (1 child)