Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion fish/functions/z-cleanup.fish → fish/conf.d/cleanup.fish
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function z-cleanup --description "Clean up z data"
function cleanup-z --description "Clean up z data"
# Because POSIX sed does not have -i option,
# here we use tmpfile and redirect to update the file.
set -l tmp_file (mktemp)
Expand All @@ -12,3 +12,11 @@ function z-cleanup --description "Clean up z data"

rm -f $tmp_file
end

function cleanup-swap
rm $HOME/.local/state/nvim/swap/*
end

function cleanup-ds-store
fd -HI '^\.DS_Store$' -X rm
end
7 changes: 7 additions & 0 deletions fish/conf.d/colima.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
function colima-up
colima start --arch aarch64 \
--vm-type=vz --vz-rosetta \
--mount-type virtiofs --mount-inotify \
--cpu 8 --memory 16 --disk 128 \
--dns 8.8.8.8 --dns 1.1.1.1
end
2 changes: 1 addition & 1 deletion fish/config.fish
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ if status is-interactive
set -gx VIRTUAL_ENV_DISABLE_PROMPT true

if not test -z "$Z_DATA"
z-cleanup
cleanup-z
end

set -l config_local $XDG_CONFIG_HOME/fish/config.local.fish
Expand Down
2 changes: 1 addition & 1 deletion fish/functions/brew-upgrade.fish
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
function brew-upgrade --description "Upgrade, autoremove, and cleanup Homebrew"
brew upgrade; brew autoremove; brew cleanup --prune=all
brew upgrade -y; brew autoremove; brew cleanup --prune=all

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove the unsupported -y upgrade option

When this helper runs with Homebrew, brew upgrade -y is rejected as an invalid option before any packages are upgraded; the semicolons then allow autoremove and cleanup to run anyway. The brew upgrade option list provides no -y switch, and upgrades are already non-interactive by default, so this flag makes the helper consistently fail to perform its primary operation.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current Homebrew documentation lists -y, --no-ask for brew upgrade: https://docs.brew.sh/Manpage#upgrade-options-installed_formula-installed_cask-. The local brew upgrade --help also reports -y, --no-ask, --yes, so -y is supported by the current version and will remain unchanged.

end
5 changes: 5 additions & 0 deletions git/ignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# local stash directory
.local-stash
#
# direnv
#
Expand Down Expand Up @@ -86,3 +88,6 @@ pip-selfcheck.json

# Claude Code
**/.claude/settings.local.json

# playwright-mcp
.playwright-mcp
3 changes: 2 additions & 1 deletion init
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,15 @@ def process() -> None:
),
# fish
SymlinkToConfig("fish/config.fish", exist_ok=True),
SymlinkToConfig("fish/conf.d/cleanup.fish", exist_ok=True),
SymlinkToConfig("fish/conf.d/colima.fish", exist_ok=True),
SymlinkToConfig("fish/fish_plugins", exist_ok=True),
SymlinkToConfig("fish/functions/brew-upgrade.fish", exist_ok=True),
SymlinkToConfig("fish/functions/fish_prompt.fish", exist_ok=True),
SymlinkToConfig("fish/functions/fish_right_prompt.fish", exist_ok=True),
SymlinkToConfig("fish/functions/fzf-docker.fish", exist_ok=True),
SymlinkToConfig("fish/functions/fzf-git-branch.fish", exist_ok=True),
SymlinkToConfig("fish/functions/fzf-z.fish", exist_ok=True),
SymlinkToConfig("fish/functions/z-cleanup.fish", exist_ok=True),
]

for install_item in install_items:
Expand Down
Loading