Skip to content
Merged
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
8 changes: 4 additions & 4 deletions zsh/custom-functions/custom-functions.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ function filesize() {
fi
}

# ignore files from git
# usage: ignore_from_git file1.md file2.txt folder1/ folder2/**
ignore_from_git() {
# exclude files from git
# usage: git_exclude file1.md file2.txt folder1/ folder2/**
git_exclude() {
local exclude_file=".git/info/exclude"

if ! git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
Expand All @@ -106,7 +106,7 @@ ignore_from_git() {

if [ $# -eq 0 ]; then
echo "Error: No file or folder was specified." >&2
echo "Usage: ignore_from_git file1.md file2.txt folder1/ folder2/**" >&2
echo "Usage: git_exclude file1.md file2.txt folder1/ folder2/**" >&2
return 1
fi

Expand Down