No-column print in ls and ls-remote if piping isatty stdout. Close #249.

This commit is contained in:
Jorge Bucaran 2016-05-05 22:19:25 +09:00
parent 89e5616b02
commit bc76864e17
No known key found for this signature in database
GPG key ID: E54BA3C0E646DB30

View file

@ -206,7 +206,11 @@ function fisher
set -l count (count $items)
if test "$count" -ge 10
printf "%s\n" $items | column -c$argv
if isatty stdout
printf "%s\n" $items | column -c$argv
else
printf "%s\n" $items | sed 's|^[@* ]*||'
end
else if test "$count" -ge 1
printf "%s\n" $items
@ -234,7 +238,11 @@ function fisher
if test -z "$format"
set format "%name\n"
__fisher_list_remote "$format" $argv | column
if isatty stdout
__fisher_list_remote "$format" $argv | column
else
__fisher_list_remote "$format" $argv
end
else
__fisher_list_remote "$format" $argv