bash-cache
pure
Our great sponsors
bash-cache | pure | |
---|---|---|
6 | 17 | |
68 | 12,795 | |
- | - | |
0.0 | 4.5 | |
over 1 year ago | about 5 hours ago | |
Shell | Shell | |
GNU General Public License v3.0 only | MIT License |
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.
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
pure
-
Carapace: A multi-shell completion library and binary
Beyond zprof (https://www.bigbinary.com/blog/zsh-profiling) not really I'm afraid. I did the majority of my zsh-prompt hacking 10 years ago and haven't thought about it since. That snippet could be from anywhere.
You could peek at something like zprezto https://github.com/sorin-ionescu/prezto or pure https://github.com/sindresorhus/pure for tips.
Fetching git/hg/... info is always slow, so try and speed that up where you can (as to how to do that, uhh... I know my prompt has a dirty-state check nicked from pure for speed reasons). You can also cache any `asdf init zsh` or similar to a file and do the same "run in background" trick so the next shell will have any changes.
The biggest improvement I can remember was dropping zprezto for my own much smaller config, I really did not need much comparatively. Mostly some git info and "good default" options. I use zgenom for a plugin manager but only have 3 plugins, probably I should just dump it and inline the plugins to avoid getting owned one day.
-
Config to make powerlevel10k look like Starship?
Run p10k configure and choose Lean style. Pure style is inferior in all respects. It exists to make https://github.com/sindresorhus/pure users feel at home.
- What is this terminal and how do I get it?
- Pure: Pretty, minimal and fast ZSH prompt
-
A Web Developer's Ultimate Guide to the Terminal on macOS
git clone "$HOME/.zsh/pure" downloads Pure from GitHub. Here we tell git where to download from ("https://github.com/sindresorhus/pure.git") and where to put the downloaded files ("$HOME/.zsh/pure")
-
Useful Shell Prompt (2020)
I've been using pure theme for a few years and absolutely love it. It shows me everything I need, but doesn't feel cluttered.
It uses 2 lines, which is actually really nice. It gives space to show where you are and git status/branch, while still allowing you to write long commands.
https://github.com/sindresorhus/pure
-
Suggest a fast convenient zsh prompt?
I’ve always been pretty happy with https://github.com/sindresorhus/pure
-
pure prompt
hey I am trying to install the Pure prompt but I am unable to do so using npm I tried to find an alternative made for oh my zsh method so I tried to do this but it results in an error saying that the pure theme can not be found even though I can see the symlink in the themes folder all I did different from this was to clone it into the themes folder so please help thanks in advance
-
Mastering Bash and Terminal
My favorite for this purpose is pure prompt: https://github.com/sindresorhus/pure
I wasn’t sure about multi line at first, but really digging it now.
-
What are some of the best zsh themes?
https://github.com/sindresorhus/pure has been my go-to for years. Haven't found a reason to change.
What are some alternatives?
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! ;)
starship - ☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!
mini-prompt - 🦊 Minimal and versatile bash prompt
iterm2-snazzy - Elegant iTerm2 theme with bright colors
bkt - a subprocess caching utility, available as a command line binary and a Rust library.
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.
powerlevel10k - A Zsh theme
spaceship-prompt - :rocket::star: Minimalistic, powerful and extremely customizable Zsh prompt
tide - 🌊 The ultimate Fish prompt.
prompt.gem - A collection of shell scripts to customize your prompt, distributed as a ProfileGem gem.
clink-flex-prompt - Flex prompt for Clink