mirror of https://git.decapod.one/brethil/dotfiles
Compare commits
2 Commits
cff20cef16
...
ee531d18cd
Author | SHA1 | Date |
---|---|---|
bretello | ee531d18cd | |
bretello | 125a4e7aed |
|
@ -3,10 +3,8 @@ vimscratch() {
|
||||||
local args
|
local args
|
||||||
# if running in a pipe, use stdin (-) as arg.
|
# if running in a pipe, use stdin (-) as arg.
|
||||||
# -t checks if the given FD is a terminal
|
# -t checks if the given FD is a terminal
|
||||||
if [ -t 0 ] ; then
|
if [ ! -t 0 ] ; then
|
||||||
args="$@"
|
stdin_arg="-"
|
||||||
else
|
|
||||||
args="-"
|
|
||||||
fi
|
fi
|
||||||
vim -c "set buftype=nofile" "$args"
|
vim -c "set buftype=nofile" $@ $stdin_arg
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue