-
Hi, I'd like to ask what are the shell scripts you enjoy using or find useful?
It might be something you incorporated to your terminal-based workflow. Or maybe some specific scripts that you often reuse. Or you have used it once, but it might be useful to other people. Or maybe you just have a script that is fun to use? Please share
My (not anymore) hidden intention is to gather your recommendations to build an open-source shell script registry Spellbook https://spellbook.maczan.pl/ Source code is here for you if you want to self host or fork it https://github.com/jmaczan/spellbook
A script I sometimes use is a commands repeater https://github.com/jmaczan/spellbook/blob/main/registry/spells/repeat-sh/spell.sh You can specify an interval and a flag to reset/keep the terminal's content after a script invocation
Thanks!
-
InfluxDB
InfluxDB high-performance time series database. Collect, organize, and act on massive volumes of high-resolution data to power real-time intelligent systems.
-
- quickly jump to recent directory: https://github.com/rupa/z - however I find it kinda annoying it seems to forget/ignore(?) directories, anyone know of a better version of this?
- quickly opening my personal wiki: https://github.com/francium/dotfiles/blob/master/bin/.local/...
- re-run a script when a file changes: https://github.com/francium/dotfiles/blob/master/bin/.local/...
For `while-watchdo` you, you run it like `while-watchdo "echo hi"`, then in my editor, I have a custom shortcut that does `touch .watchfile` causing the command, in this case `echo hi` to run. I prefer this to tools that retrigger commands as soon as you save _any_ file. Also works in docker containers, edit a file on host, command runs in a container.
-
- quickly jump to recent directory: https://github.com/rupa/z - however I find it kinda annoying it seems to forget/ignore(?) directories, anyone know of a better version of this?
- quickly opening my personal wiki: https://github.com/francium/dotfiles/blob/master/bin/.local/...
- re-run a script when a file changes: https://github.com/francium/dotfiles/blob/master/bin/.local/...
For `while-watchdo` you, you run it like `while-watchdo "echo hi"`, then in my editor, I have a custom shortcut that does `touch .watchfile` causing the command, in this case `echo hi` to run. I prefer this to tools that retrigger commands as soon as you save _any_ file. Also works in docker containers, edit a file on host, command runs in a container.
-
shellcheck, whilst not a script itself, I do find it useful when writing them.
- https://github.com/koalaman/shellcheck
-
-
diffconflicts [dc] lets you resolve diffs as a two way diff between what's in the conflict markers instead of including the resolved parts in the diff. It opens the diff in vim but could be adapted for other editors. Verbose explanation: https://github.com/whiteinge/diffconflicts/blob/master/READM...
The author converted it to a vim plugin with the same name, but I use a different vim plugin implementation [mergetool].
[dc]: https://github.com/whiteinge/dotfiles/blob/master/bin/diffco...
-
diffconflicts [dc] lets you resolve diffs as a two way diff between what's in the conflict markers instead of including the resolved parts in the diff. It opens the diff in vim but could be adapted for other editors. Verbose explanation: https://github.com/whiteinge/diffconflicts/blob/master/READM...
The author converted it to a vim plugin with the same name, but I use a different vim plugin implementation [mergetool].
[dc]: https://github.com/whiteinge/dotfiles/blob/master/bin/diffco...
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
-
I use Fuz for interactively searching my note collection, across a couple hundred text files. It's extremely useful for rapidly finding code-snippets, meeting notes or specific project information. And fast, especially combined with a hotkey for iTerm 2 that pops up a terminal and lets you search within a few keypresses.
https://github.com/Magnushhoie/fuz
As a nice side-effect, I no longer worry about where I store text (e.g. with Obsidian), as I know I'll find it again if it's there. It helps using memorable keywords though.
-
-
Zoxide is basically the 'Rust Rewrite' version of the 'Z' tool and is actively maintained, I haven't had any issues with it: https://github.com/ajeetdsouza/zoxide
-
I have quite a few, my personal collection of shell scripts: https://github.com/fastily/autobots
I also curate a shell command cheatsheet: https://github.com/fastily/cheatsheet
-
I have quite a few, my personal collection of shell scripts: https://github.com/fastily/autobots
I also curate a shell command cheatsheet: https://github.com/fastily/cheatsheet
-
tools
all-in collection of productivity scripts, CLI tools, utility libraries, fuse filesystems, and also some stuff (by bAndie91)
my collection: https://github.com/bAndie91/tools/tree/master/user-tools
-
2. Installing all of my custom scripts as 'programs' (complete with a bin directory, for easy inclusion in my PATH) under /opt/my for better tracking/management, as opposed to e.g. /usr/local/bin
3. A 'checkupdates' alias which performs update-checks via multiple systems (in my case: apt, flatpak, and my totally awesome misc-updater - see here if interested: https://sr.ht/~tpapastylianou/misc-updater/)
4. libstderred (https://github.com/ku1ik/stderred)
5. The following exports (I'll let you decipher them)
export LESS="-I -R -S -j.5 -#2"
-
Not necessarily a shell script, but fzf with bash keybindings improved my shell experience more than anything.
https://github.com/junegunn/fzf#key-bindings-for-command-lin...
-
pyxargs
Command line Python scripting with an xargs-like interface and AWK-like capabilities for data processing and task automation
pyxargs --py "print('{}') if os.path.ismount('{}') else ''" | pyxargs fusermount -u {}
My primary use case was using this with ffmpeg due to the encoding problem with xargs [2].
It can also run commands in parallel using a terminal multiplexer so outputs don't get mixed up or if they require user input.
[1] https://github.com/elesiuta/pyxargs
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives