Commit 4832e72b authored by Vitaly Lipatov's avatar Vitaly Lipatov

gitask ls: print ls via head -n20 by default

parent 8428077f
......@@ -179,8 +179,14 @@ if [ "$1" = "ls" ] ; then
fi
# TODO: with arg(s) — subtask
# TODO: add support ls -a (with subtasks)
showcmd "$GEARHOST>" girar-show "$@"
GIT_ALT=$GEARHOST girar-show "$@"
if [ -n "$1" ] || ! isatty ; then
showcmd "$GEARHOST>" girar-show "$@"
GIT_ALT=$GEARHOST girar-show "$@"
else
showcmd "$GEARHOST>" 'girar-show | head -n20'
GIT_ALT=$GEARHOST girar-show | head -n20
echo "(end of head -n20 output)"
fi
exit
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment