Retain locally customized .bashrc (gedit defaults, alias fixes) with upstream synced - #1
Merged
Merged
Conversation
Documents the local customizations to the tracked .bashrc in this clone (~/linuxtoolbox/mybash), which is the live file via the ~/.bashrc symlink created by setup.sh. Relative to upstream main: 35 insertions, 63 deletions. Interactive-shell guard - Add an early `[[ $- != *i* ]] && return` so non-interactive shells leave the file before running interactive-only setup. Editor defaults (nvim -> gedit) - EDITOR/VISUAL: nvim -> gedit. - pico/spico now map to gedit; nano/snano map to nano. - Add `alias vi='nvim'` alongside the existing `alias vim='nvim'`. Aliases - ls: `ls -aFh` -> `ls -laFh --color=always` (long format by default). - less: add `-R --use-color -Dd+r -Du+b`. - man: add `alias man="man -P most"`. - svi: now `sudo nvim`; add `findall="sudo find / | grep "`. - ebrc -> editrc (`gedit ~/.bashrc`). - Re-enable the GREP_OPTIONS block and the `grep` alias. - Remove the `freshclam`, `web`, and `hug` (hugo server) aliases. Pager and man-page colors - Relocate the LESS_TERMCAP_* definitions to the tail of the file, switch them from `$'\E[...'` to `printf '\e[...'`, adjust the md/so/us colors, and add `export PAGER="most"`. Startup hooks - Add `. "$HOME/.atuin/bin/env"` after `atuin init bash`. Removals - Drop the redundant `install_bashrc_support()` helper. Known issues carried in this change, deliberately not fixed here: - `export sgedit='sudo gedit'` creates an environment variable rather than an alias, so `sgedit` is not invocable from an interactive shell. - `alias nano='nano'` is a self-referential no-op. - GREP_OPTIONS was removed in GNU grep 2.21; this host ships 3.11, so the re-enabled GREP_OPTIONS block has no effect. - `man -P most` and `PAGER=most` depend on the `most` package. Verified: `bash -n .bashrc` passes. gedit, most, nvim, starship, zoxide, atuin, and trash are all present on this host, and ~/.atuin/bin/env exists. Co-Authored-By: Warp <agent@warp.dev>
Follow-up to the .bashrc customization commit. Addresses defects introduced by that change plus one pre-existing upstream breakage. - sgedit: `export sgedit='sudo gedit'` defined an environment variable rather than an alias, so `sgedit` was not invocable. Now an alias. - grep: drop the GREP_OPTIONS export and the alias that expanded it. GREP_OPTIONS is ignored by GNU grep >= 2.21 (this host has 3.11), so the block was dead code. Replaced with `alias grep='grep --color=auto'`. - nano: drop `alias nano='nano'`, a self-referential no-op, now that /usr/bin/nano is confirmed to be on PATH. - spico/snano: apply the s-prefix-means-sudo convention already used by svi and sgedit. `spico` was an exact duplicate of `pico`; it is now `sudo gedit`, and `snano` is now `sudo nano`. - sedit: 13 call sites across apacheconfig(), phpconfig() and mysqlconfig() invoked a command defined nowhere on the system (no alias, no function, no binary), so all three functions were broken. They were equally broken upstream, which only ever referenced sedit without defining it. Repointed at the `sgedit` alias, which is also semantically correct: every target is a root-owned file under /etc. - most: `alias man='man -P most'` and `export PAGER='most'` assumed the `most` package, which setup.sh does not install. Both now sit behind a `command -v most` guard, so `man` falls back to its default pager instead of failing on a machine without it. Verified: `bash -n .bashrc` passes; each corrected alias resolves when sourced in a clean `bash --norc` shell; `type -a nano` resolves to /usr/bin/nano. On this host `most` is installed, so pager behavior is unchanged from before this commit. Co-Authored-By: Warp <agent@warp.dev>
Brings the upstream changes accumulated since 4e92a96 into this branch. Upstream's non-.bashrc changes all applied cleanly: LICENSE, config.jsonc, uninstall.sh, starship-theme, shellcheck.log, the bashtest workflow and dependabot config, plus updates to README.md, setup.sh and starship.toml. .bashrc was the only conflict, because upstream's "CTT Bash V2" (94129d3) rewrote it wholesale (871 lines vs 556) while this branch carries local customizations on the previous version. Resolved in favor of the local version so the live shell configuration is preserved unchanged. Consequences, deliberately accepted: - Upstream's V2 .bashrc is not adopted into the live config. It remains available on `main` for a deliberate port later. - Upstream now defines sedit() itself (line 119 of its .bashrc), so the sedit -> sgedit repointing in 1faac98 is superseded upstream but still applies to the local .bashrc retained here. - Upstream independently dropped GREP_OPTIONS too, matching 1faac98. Verified before committing: .bashrc sha256 equals the pre-merge backup (2205d9a4c451a608745c58933b549a19025e02036ea076cd9d8ad8d4567ba824), no conflict markers, `bash -n .bashrc` passes, and ~/.bashrc resolves to the same content. Co-Authored-By: Warp <agent@warp.dev>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR simplifies ChangesShell configuration and command behavior
Estimated code review effort: 4 (Complex) | ~45 minutes Change: Other Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
Retains the locally customized
.bashrcand syncs the branch with upstreammain.~/.bashrcon this machine is a symlink into this repo, so this file is the live shellconfiguration rather than a copy of it.
Contents
LICENSE,config.jsonc,uninstall.sh,starship-theme,shellcheck.log, the bashtest workflow and dependabot config, plus updates toREADME.md,setup.shandstarship.toml.Deliberate decision: upstream's V2
.bashrcis not adoptedUpstream's
CTT Bash V2(94129d3) rewrote.bashrcwholesale (871 lines versus the 556 here). The merge resolved that single conflict in favour of the local version, so the live shell configuration is preserved unchanged.This is also why this PR is scoped to the fork and is not proposed upstream: relative to upstream's
main, the.bashrcdiff is effectively a revert of the V2 rewrite, which is not a contribution that maintainer would want.Overlap with upstream worth noting:
sedit()itself (line 119 of its.bashrc), so thesedit -> sgeditrepointing is superseded upstream but is still required by the.bashrcretained here.GREP_OPTIONS, matching the local fix.Bugs fixed
export sgedit='sudo gedit'defined an environment variable rather than an alias, sosgeditwas not invocable.alias nano='nano'was a self-referential no-op.spico/snanonow follow the s-prefix-means-sudo convention already used bysvi.apacheconfig(),phpconfig()andmysqlconfig()invokedsedit, which was defined nowhere (no alias, no function, no binary). All three functions were broken, and equally broken upstream before V2.man -P mostandPAGER=mostassumed themostpackage, whichsetup.shdoes not install. Both now sit behind acommand -v mostguard.Verification
bash -npasses on.bashrc,setup.sh,uninstall.shandstarship-theme.shellcheck -f gccover*.sh, per.github/workflows/bashtest.yml) reports zero findings.shellcheckon.bashrcitself reports 0 errors (9 warnings, 20 notes). Note the CI never lints.bashrc, becausefind . -name "*.sh"does not match it.EDITOR=geditandPAGER=most..bashrcsha256 is byte-identical to the pre-merge backup, so the live shell configuration did not change.Conversation: https://app.warp.dev/conversation/7e6205a9-dbe4-4c06-b448-95b8ed246a72
Co-Authored-By: Warp agent@warp.dev
Summary by CodeRabbit
New Features
hbcommand for uploading content to haste-bin.Changes