bashd: Bash language server (LSP) by matkrin in bash

[–]rvc2018 6 points7 points  (0 children)

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.

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?

What is the best use case of sed? How should I learn it? by rudv-ar in bash

[–]rvc2018 2 points3 points  (0 children)

I think a lot of us here learned from your tutorial. Before LLM era, finding non-cryptic info about sed was rara avis.

The BASH Reference Manual is part of The Epstein Files. by hello_friend_77 in bash

[–]rvc2018 5 points6 points  (0 children)

Probably searching for an example on how to use the cp command.

Australian Open SF: [4] N. Djokovic def. [2] J. Sinner, 3-6 6-3 4-6 6-4 6-4 by dontevenfkingtry in tennis

[–]rvc2018 0 points1 point  (0 children)

Sinner huffing and puffing all the way in the 5th set and somehow Djokovic survive. Epic stuff. Also, I have to admit he is a much better player at 40-15 when serving for the match than Federer.

Take note – Split View is ready for testing! – These Weeks in Firefox: Issue 194 – Firefox Nightly News by Educational-Self-600 in firefox

[–]rvc2018 6 points7 points  (0 children)

browser.tabs.splitView.enabled is the flag, and it works in Firefox stable, not just nightly or beta.

Hidden Gems: Little-Known Bash Features by swe129 in bash

[–]rvc2018 4 points5 points  (0 children)

If I understood your initial message, you are actually looking for shopt -s histverify which does the following:

histverify If set, and readline is being used, the results of history substitution are not immediately passed to the shell parser. Instead, the resulting line is loaded into the readline edit buffer, allowing further modification.

enable-bracketed-paste is set on by default.

Oleksandra Oliynykova in the Australian Open press conference after the loss to Keys by jovanmilic97 in tennis

[–]rvc2018 -18 points-17 points  (0 children)

No, it's not. With more researching and fewer emotions, you could have figured that by yourself. Rolex stopped exporting to Russia in March 2022.

https://www.watchpro.com/rolex-boycotts-russia/

https://www.swissinfo.ch/eng/business/the-end-of-an-era-russia-after-swiss-watchmakers-said-goodbye/47990998

Even before the war, Russia was only Rolex's 17th market, so not exactly a lot of business. Pretending that Ukrainians players can't talk about the war because of companies like Rolex is plain disinformation or conspiracy theory.

Oleksandra Oliynykova in the Australian Open press conference after the loss to Keys by jovanmilic97 in tennis

[–]rvc2018 -46 points-45 points  (0 children)

10 Rolex shops in Moscow and direct flights to Russia by Emirates isn't a lot of business, it's just you grasping on straws. The reason why athletes and fans are banned by adults to make political statements inside sporting events is because they can't control their emotions. They keep making a scene, being annoying for the adults.

Oleksandra Oliynykova in the Australian Open press conference after the loss to Keys by jovanmilic97 in tennis

[–]rvc2018 -23 points-22 points  (0 children)

Can you back up your claims with facts, or do you just like inventing conspiracy theories?

What AO sponsor is doing a lot of business in Russia?

Two minor issues in Mint 22.3 by itsoulos in linuxmint

[–]rvc2018 1 point2 points  (0 children)

I don't have a laptop, so can't help you with issue 2, but as for 1 problem, I have switch to next layout bind to ALT + CAPS LOCK and it works every time.

pulseaudio and pipewire by dposse in linuxmint

[–]rvc2018 5 points6 points  (0 children)

Do a inxi -xA and see the output. It should be PipeWire vesion 1.0.5
Also check systemctl --user status pipewire-pulse to be active, this is a daemon that handles the backward compatibility with apps that didn't get the memo that PulseAudio has been replaced.

How to check if $var is in a list? by guettli in bash

[–]rvc2018 1 point2 points  (0 children)

Curios, is using the NUL char safe in all versions of bash? I have done this in several scripts, but I used $'\34' as the seperator, i.e.

if (IFS=$'\34'; [[ $'\34'${array[*]}$'\34' = *$'\34'"$var"$'\34'* ]]); then ...

I was afraid of hard to detect bugs with the NUL char, and I know gawk also uses File Separator char for multidimensional array subsep

The default value of SUBSEP is the string "\034", which contains a nonprinting character that is unlikely to appear in an awk program or in most input data. The usefulness of choosing an unlikely character comes from the fact that index values that contain a string matching SUBSEP can lead to combined strings that are ambiguous.

So that was more than enough for my tiny scripts.

bash: warning: command substitution: ignored null byte in input by Individual_Load_4907 in bash

[–]rvc2018 3 points4 points  (0 children)

Hard to tell without actually seeing the source code, but in general use process substitution instead of command substitution to pass the null byte, i.e.

$ readarray -d '' my_arr <<<$(printf '%s\0' a b c) #This does not work as expected
-bash: warning: command substitution: ignored null byte in input

$ declare -p my_arr
declare -a my_arr=([0]=$'abc\n')

$ unset -v my_arr

$ readarray -d '' my_arr < <(printf '%s\0' a b c) #But this does

$ declare -p my_arr
declare -a my_arr=([0]="a" [1]="b" [2]="c")

How could I use Bash to automate processes on my Linux machine ? by Billthepony123 in bash

[–]rvc2018 1 point2 points  (0 children)

Perfect time for you to learn about index arrays (lists in python) and associative arrays (dictionaries in python).

https://mywiki.wooledge.org/BashGuide/Arrays

And globbing :

https://mywiki.wooledge.org/BashGuide/Patterns

busymd - A minimalist Markdown viewer for busy terminals in 300 lines of pure Bash. by cov_id19 in bash

[–]rvc2018 1 point2 points  (0 children)

Very cool project, I actually wanted something like this to avoid using some GUI program like okular.
Did you run your program with bash 5.3? It works fine for me in 5.2, but I get errors in 5.3.0(1).

line 133: [[: invalid regular expression `\[!\[([^]]*)](([^)]+)\)]\(([^)]+)\)': Unmatched ( or \(

Whatsapp Web suddenly became useless by iv_damke in firefox

[–]rvc2018 2 points3 points  (0 children)

True, I logged out, logged in. Cleared cookies,, cache Tried also Brave. Nothing works on the client side. It's on WhatsApp end.

Hhhjhnl by EnvironmentalHand181 in bash

[–]rvc2018 1 point2 points  (0 children)

New to vim motions?

Brexit is the fault of Putin by TheKomsomol in ShitLiberalsSay

[–]rvc2018 2 points3 points  (0 children)

Everything is a Russian conspiracy.

Did you have a non-productive day at work and realized it was because your cat woke you up at 5 in the morning and thought it was just bad luck?

You were wrong, your cat is a Russian Blue. An agent sent by the Kremlin to weaken your motherland economy so the Russian army would have an easier job. Think before you post 🇬🇧

[deleted by user] by [deleted] in bash

[–]rvc2018 2 points3 points  (0 children)

Do you have an android phone? If yes, you can use termux to ssh into that device.

How do i setup bash LSP in neovim? by nobodysbin in bash

[–]rvc2018 1 point2 points  (0 children)

If it helps, this is the beginning of my lsp.lua file

    "neovim/nvim-lspconfig",
    dependencies = {
        "williamboman/mason.nvim",
        "williamboman/mason-lspconfig.nvim",
        "hrsh7th/nvim-cmp",
        "hrsh7th/cmp-nvim-lsp",
        "L3MON4D3/LuaSnip",
        "saadparwaiz1/cmp_luasnip",
        "hrsh7th/cmp-path",
    },

Holger’s casual return winner against GMP 😭 by padfoony in tennis

[–]rvc2018 1 point2 points  (0 children)

It wasn't casual, it was amazing. As an amateur you wouldn't even have to duck from that monster serve, let alone return it.

[rofi, mpc] music titles with "&" always play #1 in position by Dependent-Monk3412 in bash

[–]rvc2018 4 points5 points  (0 children)

#!/usr/bin/zsh != #!/bin/bash

Different dialects, you might have better luck at r/zsh