We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 42458d8 + 27ee8f0 commit 3d6f945Copy full SHA for 3d6f945
bin/git-ignore
@@ -57,6 +57,10 @@ function add_private {
57
function add_patterns {
58
echo "Adding pattern(s) to: $1"
59
local file="${1/#~/$HOME}"
60
+ dir_name=$(dirname "$file")
61
+ if [ ! -d "$dir_name" ]; then
62
+ mkdir -p "$dir_name"
63
+ fi
64
if [ -s "$file" ]; then
65
# If the content of $file doesn't end with a newline, add one
66
test "$(tail -c 1 "$file")" != "" && echo "" >> "$file"
bin/git-ignore-io
@@ -85,7 +85,7 @@ show_usage() {
85
check_list_exist() {
86
if ! [ -f "$default_path" ]; then
87
echo "-----Initial gitignore.io list----"
88
- update_gi_list &
+ update_gi_list
89
echo "-----Save to $default_path-----"
90
echo
91
fi
0 commit comments