I’ve only worked on a mac and linux system for the past 10 years. I’m writing a build script that would ideally create some aliases in the .zshrc
or .bashrc
for mac and linux user’s, but I’ve never done the same for a windows machine and I don’t have any to test the script with.
If I use Node’s os.userInfo()
method to return the object that includes the path to the shell, I can pretty easily gather whether or not it’s a bash or zsh shell from the path, but for window’s I don’t know what either the path will look like, or the syntax for aliases.
I’m aware that I can very easily look this up in powershell docs, but having never done any meaningful work on a windows machine, or any shell other than zsh and bash, I’m not comfortable just following the docs and releasing something that might not work for a significant subset of users. The app that the build script will generate will be targeted at students and academics, so while I’m sure a fair amount will have experience with the terminal or at least one programming language, I want to make the build script as smooth as possible for those without that experience.
Also, I’m aware there are some less common shells out there, but I’m assuming that anyone that uses one of these less common shells will be able to create their own aliases. If you are aware of the equivalent of echo 'alias someAlias="someAliasValue"' >> <homedir>/.zshrc
for any other shells, please do let me know: