mirror of
https://github.com/tj/git-extras.git
synced 2026-09-15 09:56:19 -04:00
Support ~ in show git-ignore
This commit is contained in:
parent
06a8f74f28
commit
bf89063212
|
|
@ -1,8 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
function show_contents {
|
||||
if [ -f "$2" ]; then
|
||||
echo "$1 gitignore: $2" && cat "$2"
|
||||
local file="${2/#~/$HOME}"
|
||||
if [ -f "$file" ]; then
|
||||
echo "$1 gitignore: $2" && cat "$file"
|
||||
else
|
||||
echo "There is no $1 .gitignore yet"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue