shrc
docopt.sh
Our great sponsors
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
docopt.sh
-
Docopt.sh – Command-Line Argument Parser for Bash 3.2, 4, and 5
I like that this generates readable output that could pass as hand-written code.
The docopt.sh output looks like it went through a JS minifier. Or is there a way to change that? If so I think it should default to that.
https://github.com/andsens/docopt.sh/blob/master/docs/naval_...
-
Programs are dead, and JavaScript has killed them
If you want to avoid having to write your own args parser everytime or think getopt is a pain, you should check out my little project:
https://github.com/andsens/docopt.sh
No dependencies, the code is directly inlined into your script, and you write the args parser by writing the help-text.
-
Beautiful Scripts
Honestly, I left it as a gist because even though it reduces boilerplate, getopts is still not a great flag parser (e.g. only supports single-letter flags, and no type safety or other validation aside from boolean / string). I use it in my shell environment since I have lots of shell functions and I don't care to pull in a "real" parser into my shell, but if I was writing any sort of more complex standalone script I probably wouldn't use it. Check out docopt if you haven't seen it, I've been meaning to give that a whirl at some point.
What are some alternatives?
bash-cache - Transparent caching layer for bash functions; particularly useful for functions invoked as part of your prompt.
docopt - This project is no longer maintained. Please see https://github.com/jazzband/docopt-ng
bashmarks - Directory bookmarks for the shell
arg - usage: arg [...args]; output: (count of args):(len of args) (...quoted arguments)
tinysh - Tiny UNIX shell, de-obfuscated, modernized, and "rewritten in Rust".
zfm - Zsh Fuzzy Marks
clipboard-over-ssh - copy clipboard command from the remote clipboard (meant to be used with micro editor)
rpg-cli - Your filesystem as a dungeon!
extrakto - extrakto for tmux - quickly select, copy/insert/complete text without a mouse
smartcd - SmartCd - A Mnemonist cd Command with Autoexec Feature
smenu - smenu started as a lightweight and flexible terminal menu generator, but quickly evolved into a powerful and versatile CLI selection tool for interactive or scripting use.