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
|
||||
# if running in a pipe, use stdin (-) as arg.
|
||||
# -t checks if the given FD is a terminal
|
||||
if [ -t 0 ] ; then
|
||||
args="$@"
|
||||
else
|
||||
args="-"
|
||||
if [ ! -t 0 ] ; then
|
||||
stdin_arg="-"
|
||||
fi
|
||||
vim -c "set buftype=nofile" "$args"
|
||||
vim -c "set buftype=nofile" $@ $stdin_arg
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue