diff --git a/vcsh b/vcsh index a374f05b4c74d710116f50eb3b6a11575f236299..1d947d1ae920db1a81e76be3a86bf5a700ff4e25 100755 --- a/vcsh +++ b/vcsh @@ -306,7 +306,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