I'm trying to figure out how to make scripts run in PowerShell by default. When I execute commands like `fzf --preview='cat {}'`, it seems to default to Windows' command interpreter instead of using PowerShell. This is also the case when running a .bat file directly, which doesn't initiate PowerShell. I know I can run it as `fzf --preview='powershell cat {}'`, but I'd prefer to change the default interpreter to PowerShell. Any suggestions? By the way, I have the `cat` command available through Git for Desktop, and it doesn't work even if I use `ls`, which I thought was standard in PowerShell. Am I missing something?
1 Answer
PowerShell has a lot of Unix-like aliases, so you can use commands like `cat` and `ls` just fine within it. But when you say you're running a script that calls another script, what do you mean? It would help if you could share how you're currently executing these scripts. Can you provide an example?
I was referring specifically to the command `fzf --preview='cat {}'`, which runs `cat` on the file, but it seems to use the default command interpreter instead of PowerShell. I even tried it with a .bat file that just uses `ls` to check if it was an issue with `fzf` or if it was broader. It's as if I'm running it directly via File Explorer, and PowerShell isn't being triggered.