shrc
bash-cache
Our great sponsors
shrc | bash-cache | |
---|---|---|
7 | 6 | |
10 | 68 | |
- | - | |
2.4 | 0.0 | |
9 months ago | over 1 year ago | |
Shell | Shell | |
- | GNU General Public License v3.0 only |
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.
shrc
-
ls is bloat
do I need to say it: 4x time faster. just minus some the cool parts and fallbacks are not that hard, like local keyword https://github.com/denisde4ev/shrc/blob/master/_fallback/local. and the consequences of not having local all around my repos unset-unseted-i and unset-seted-i that throws error if nested functions use i variable at the same time.
-
pavement | lolcat
I already have lolwall in my bashrc, but I forgot the bricks
-
yank: copy terminal output to clipboard
my aliases are alias cin='xclip -sel clip -r' cout='xclip -sel clip -o' for clipboard input/output (hi C++ programmers). And if its Wayland then it uses wl-copy or if have termux-clipboard commands. my entire file for detecting it is: https://github.com/denisde4ev/shrc/blob/master/clip-io
-
what is your favorite cd tool (z, z.lua, autojump, zoxide ....) ?
I wrote my own sh function aliased to cd.. and CD https://github.com/denisde4ev/shrc/blob/master/_loadable/_cd__.sh
-
why even use aliases instead of just functions?
you can see my __load_loadable function here https://github.com/denisde4ev/shrc/blob/master/_loadable/LOADABLE (sorry if my code is not simple)
- Beautiful Scripts
-
What do you use Linux on? What do you not?
My PC: Lenovo AIO; 21" touchscreen monitor; Arch+KDE. I'm happy witch my bashrc/shrc organization
bash-cache
-
Why is it that a command run from the terminal command line produces line break but the same command run within bash script has no line break/
This is usually what a caller expects, but it's definitely surprising when it isn't. I encountered this with my bash-cache library because simpler approaches to caching commands will use command substitutions which turns out to be lossy (because it drops any trailing newlines).
-
Passing a command with double quotes to a function
Is the goal of your cache function to cache a command if it's been run before? If so you might like to use my bash-cache library :) Even if it's not quite what you're looking for you can poke around the code for some inspiration, it implements a function decorator pattern and demonstrates some hairy uses of eval.
-
New release of bkt, a subprocess caching utility
For another pure-bash solution (though it writes to disk, not in-memory arrays) check out my bash-cache library :) it's an older project that motivated bkt but I still use both. There's some terrifying bash patterns in bash-cache as well!
-
Beautiful Scripts
I'm pretty proud of my bash-cache utility, which implements a decorator pattern in Bash. Define a function, pass it to bc::cache, and like magic the function is wrapped with a caching layer.
- Been meaning to share this bash memoization library for a while; it uses a decorator pattern to transparently add a caching layer to functions
- Been meaning to share this function memoization library for a while; it uses a decorator pattern to wrap functions with a transparent caching layer
What are some alternatives?
bashmarks - Directory bookmarks for the shell
pure - Pretty, minimal and fast ZSH prompt
arg - usage: arg [...args]; output: (count of args):(len of args) (...quoted arguments)
fancy-git - That's a terminal prompt changer that shows a few cool git informations about your repository state. You can choose among different styles and enjoy all the aliases it provides you. Feel free for contributing, pull requests and issues are always welcome! ;)
tinysh - Tiny UNIX shell, de-obfuscated, modernized, and "rewritten in Rust".
mini-prompt - 🦊 Minimal and versatile bash prompt
zfm - Zsh Fuzzy Marks
bkt - a subprocess caching utility, available as a command line binary and a Rust library.
docopt.sh - Command-line argument parser for bash 3.2, 4+, and 5+.
sbp - Simple Bash Prompt (SBP) is a bash prompt, which strives to be simple. But it isn't. But it looks kind of nice. I think.
clipboard-over-ssh - copy clipboard command from the remote clipboard (meant to be used with micro editor)
spaceship-prompt - :rocket::star: Minimalistic, powerful and extremely customizable Zsh prompt