mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-14 05:31:14 -03:00
This ran two `test`s a `count` and one `echo`, which is a bit wasteful. So instead, for the common case where you pass one argument, this will run one `set -q`. This can save off ~160 microseconds for each ordinary `cd`, which speeds it up by a factor of ~2 (so 1000 runs of cd might take 260ms instead of 550ms). Ideally the cd function would just be incorporated into the builtin, but that's a bigger change.
1.3 KiB
1.3 KiB