mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-03 03:37:36 +00:00
revert(shell): move iris integration to the iris branch
Reverts43dfe48,0692ae3,e0cdcd6and the cable-description half of098da70(the star-prompt stats stay). master returns to the pre-iris shell setup: atuin in fish/zsh/bash, the down -> pj binding with PJ_QUIET, and the fish/zsh key bindings as they were. The iris work lives on the `iris` branch.
This commit is contained in:
1 parent
098da702fc
commit
2049f580f0
27 files changed
+237
-408
No files matched your search
@@ -1,35 +0,0 @@
|
||||
# czs: chezmoi re-add drifted files, then commit + push the source repo.
|
||||
# Port of functions/czs.fish. Optional targets scope the status view and the
|
||||
# re-add (e.g. `czs ~/.config/fish`); no args = all managed files.
|
||||
czs() {
|
||||
local drift src ahead
|
||||
drift=$(chezmoi status "$@") || return
|
||||
|
||||
if [[ -n $drift ]]; then
|
||||
print -r -- $drift
|
||||
# re-add takes the local (destination) contents as truth for modified
|
||||
# files; templates are never overwritten, non-file entries are ignored.
|
||||
chezmoi re-add "$@" || return
|
||||
else
|
||||
echo "chs: in sync — nothing to re-add"
|
||||
fi
|
||||
|
||||
# Commit + sync the source repo (~/.local/share/chezmoi).
|
||||
src=$(chezmoi source-path)
|
||||
if [[ -n $(git -C $src status --porcelain) ]]; then
|
||||
git -C $src add -A &&
|
||||
git -C $src commit --quiet -m 'chs: re-add drifted files' || return
|
||||
echo "chs: committed $(git -C $src rev-parse --short HEAD)"
|
||||
fi
|
||||
|
||||
# Push anything unpushed: this commit and leftovers from a failed push.
|
||||
# --autostash tolerates post-commit hooks re-dirtying the tree mid-sync.
|
||||
ahead=$(git -C $src rev-list --count @{upstream}..HEAD 2>/dev/null || echo 0)
|
||||
if (( ahead > 0 )); then
|
||||
git -C $src pull --rebase --autostash --quiet &&
|
||||
git -C $src push --quiet &&
|
||||
echo "chs: pushed $ahead commit(s) to $(git -C $src remote get-url origin)"
|
||||
else
|
||||
echo "chs: remote up to date"
|
||||
fi
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
# y: same as yy (fish has both names) — yazi, then cd to its exit directory.
|
||||
y() { yy "$@"; }
|
||||
Reference in new issue
Block a user