-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
preexec: set options before load #1
preexec: set options before load #1
Conversation
- Remove limitation on OS. - Add search for Mac OS X developer tools locations by using `xcrun` instead of trying to guess paths. - �Add search for locations based on path of `$GIT_EXE` (set by `lib/theme`).
skip go tests when go is not available
plugins: Add ble.sh plugin
completion/git: improvements and linting
ci: Bump go to 1.17 from 1.14
…autosave-history-plml * 'master' of https://github.com/bash-it/bash-it: (114 commits) ci: Bump go to 1.17 from 1.14 skip go tests when go is not available plugins: Add ble.sh plugin clean up pyenv plugin Lint: prepare `lib/utilities` for `shellcheck` (Bash-it#1933) plugin/base: improvements (Bash-it#1930) plugins/percol: `bind` completion/git: `shfmt` && `shellcheck` completion/git: expand search range plugin/percol: `shellcheck` & `shfmt` plugins/percol: use `_command_exists` completion/pip: simplify code flow plugin/less-pretty-cat: remove `|| cat` completion/wpscan: simplify code flow (whitespace) plugins/less-pretty-cat: simplify code flow plugins/less-pretty-cat: use `_command_exists` lib/helpers: cite `_bash-it-find-in-ancestor()` gradle: adopt `_bash_it_find_in_ancestor()` lib/helpers: new function `_bash-it-find-in-ancestor()` completion/laravel: simplify code flow ...
The tilde should not have been escaped, and in fact I did not have it escaped in my main branch, but the PR I submitted did have it escaped and...now it shows up in the prompt line for all the PowerLine themes... oops.
theme/powerline: fix an oops in the last patch
alsö fix usage example of `_bash-it-array-contains-element()`
No need to `rm` when we overwrite the file the line after next. Alsö, use `>|` in case the user sets `noclobber`; we do expressly intend to overwrite the file in this case.
See the discussions in Bash-it@953e422#commitcomment-58148656 . Tested with bash 5.1 and bash 3.2
Add history flushes on each command to the powerline themes
Use $XDG_CACHE_HOME environment constant instead of placing a tmp/cache folder inside the bash-it data repo. If not defined, fall back to current behavior. This resolves Bash-it#1904.
Doesn't show up on my shellcheck 0.7.2, but does for NoahGorny!
The existing function `_bash-it-grep()` is weird. New function `_bash-it-egrep()` just does the thing without requiring two subshells and manual invocation.
Fix home dir substitution
lib/utilities: minor improvements
Fix save-and-reload-history command not found
@gaelicWizard I tested this, but didn't include your changes to the preexec lib. With your Edit: to be clear, I don't think we should wait on rcaloras/bash-preexec#119. from my testing, what you've figured out works with preexec as-is. |
The problem is that without some changes to upstream, the "current" command passed in to the preexec function(s) may be inaccurate. |
Well, the preexec owner has been very polite and pretty clear that they aren't going to merge any of our PRs. The fact that iTerm ships with a patched version of Within that context, let me know if you have any other clever ideas. I'll try to think about this at my next free iteration cycle. |
7ff2386
to
8db5333
Compare
By setting `__bp_delay_install`, we avoid any immediate initialization at all. We then override two troublesome functions before calling `__bp_install_after_session_init()`. The `__bp_install_after_session_init()` function doesn't enable the DEBUG trap, just sets `$PROMPT_COMMAND` to include `__bp_install()`, so the actual final `$PROMPT_COMMAND` is not finished, and DEBUG trap set, until after the first prompt is displayed.
8db5333
to
5fb69dd
Compare
I'm just butt-hurt that (after being grumpy) I put in the work to fix their code to do everything they wanted, add emulation of user-configured preference while still doing their mangling (from another patch), and fall back to Like, I get it they dude just wants to do his thing but...like my combined patch does do his thing and alsö our thing. 😢 #sadpanda (I drink the open source cool-aid; I always imagine that everyone is altruistic and out to help each other (within reason), &c, &c.) And on top of that, once I realized same dude alsö runs BashHub, I realized that actually that's kinda cool and makes total sense why he wants to make sure history entries don't silently disappear, but alsö it's extremely creepy that a no-security cloud sync service goes out of it's way to silently and without documentation alter a user-configured setting which many users rely* on to hide passwords from their shell history file. Like, literally I would specifically want to hide some history from the automatic cloud sync service.
Anyway, enough whining. 😃 |
@gaelicWizard Yeah, I think that's where we see projects get forked. You could always start |
Description
By setting
__bp_delay_install
, we avoid any immediate initialization at all. We then override two troublesome functions before calling__bp_install_after_session_init()
.The
__bp_install_after_session_init()
function doesn't enable the DEBUG trap, just sets$PROMPT_COMMAND
to include__bp_install()
, so the actual final$PROMPT_COMMAND
is not finished, and DEBUG trap set, until after the first prompt is displayed.Motivation and Context
Along with upstream PR 119, this should make things safe and reliable to use.
How Has This Been Tested?
A variation of this is live on my main branch.
Types of changes
Checklist:
clean_files.txt
and formatted it usinglint_clean_files.sh
.