PSFzf
PSFzf copied to clipboard
Enabling aliases is very slow
I add the following to my PS init script to enable aliases on all shells:
echo "Loading aliases ..."
Enable-PsFzfAliases
echo "Done."
However this slows down the shell initialization by several seconds (5s). Any way to speed things up here?
> Measure-Command { Enable-PsFzfAliases }
Days : 0
Hours : 0
Minutes : 0
Seconds : 4
Milliseconds : 308
Ticks : 43080303
TotalDays : 4.98614618055556E-05
TotalHours : 0.00119667508333333
TotalMinutes : 0.071800505
TotalSeconds : 4.3080303
TotalMilliseconds : 4308.0303
Try using Set-PsFzfOption. You need to explicitly specify which aliases you want to enable, but it should speed up load time.
Enabe-PsFzfAliases needs to do more checking to prevent clashing with exes in your %PATH%.