X-Git-Url: https://git.madduck.net/code/vcsh.git/blobdiff_plain/de1c75a12e9f0f586b1973d3866ad4707d263a08..09eef208e8d62408b0b7a1fd5d4cb04715b49358:/vcsh?ds=sidebyside diff --git a/vcsh b/vcsh index a374f05..a19aceb 100755 --- a/vcsh +++ b/vcsh @@ -109,6 +109,7 @@ help() { list-tracked List all files tracked by vcsh list-tracked-by \\ List files tracked by a repository + list-untracked List all files not tracked by vcsh pull Pull from all vcsh remotes push Push to vcsh remotes rename \\ @@ -306,7 +307,7 @@ list_untracked() { git ls-files --others "$directory_opt" | ( while read line; do echo "$line" - directory_component="$(echo "$line" | cut -d'/' -f1)" + directory_component=${line%%/*} [ -d "$directory_component" ] && printf '%s/\n' "$directory_component" done ) | sort -u > $temp_file_others