Fix dirs returns false when $dirstack is empty#8211
Fix dirs returns false when $dirstack is empty#8211faho merged 1 commit intofish-shell:masterfish-shell/fish-shell:masterfrom andrew-schulman:bugfix/dirs-returns-falseandrew-schulman/fish-shell:bugfix/dirs-returns-falseCopy head branch name to clipboard
Conversation
|
I would say current behavior seems right. There is a slight difference between printing nothing and matching nothing, and adding a EDIT: I'm being dumb here, just noticed |
I don't understand, what's the difference here? I don't think "matching" applies here because we just print the dirstack entries one by one. I think we should probably change |
|
|
|
Yeah, makes sense. Merged! |
Description
In fish 3.3.1, when
$dirstackis empty,dirsreturns false. This is undesirable, because no error occurred.It happens because the
string joinat the end doesn't join anything, so it returns false. The solution is just to add areturn 0at the end of the function.TODOs: