This allows different commands to order their directories in different ways.
The cd command assumes you are not trying to change directory into the
directory you are already in, and hence sorts such that the current directory is
always at the bottom.
The browse command, when passed a slug, assumes that you are more likely want
the current clone, and orders the current working directory at the top.
TODO: sort on the host + slug (github.com/org/repo) rather than the actual directory name, so that repos from the same org but in different paths (ie, one in $GOPATH, one not) have a closer distance.
This allows different commands to order their directories in different ways.
The
cd
command assumes you are not trying to change directory into the directory you are already in, and hence sorts such that the current directory is always at the bottom.The
browse
command, when passed a slug, assumes that you are more likely want the current clone, and orders the current working directory at the top.TODO: sort on the host + slug (
github.com/org/repo
) rather than the actual directory name, so that repos from the same org but in different paths (ie, one in$GOPATH
, one not) have a closer distance.