Fun posix shell quiz:Run echo $(git branch) in a git repo
Senza categoria
2
Post
2
Autori
0
Visualizzazioni
-
Fun posix shell quiz:
Run
echo $(git branch)
in a git repo.This will usually print a list of all your branches, interleaved with the files in the current directory. Why is that?
-
Fun posix shell quiz:
Run
echo $(git branch)
in a git repo.This will usually print a list of all your branches, interleaved with the files in the current directory. Why is that?
@bean because the current branch is marked with a * which the shell expands to show the list of files in the current directory. Classic unescaped argument problem.