I have a Python project that is compiled using pyinstaller
. It usually uses a bunch of concatenated operations &&
to not only compile, but perform several other things. Ok, just a big command.
I can use an alias with git bash to reduce it to a single word, fine. But I want to know, if exists some way to distribute some bash file with that alias with my project.
I mean, in my repo, having something like alias.sh
that contains the alias I want, but they just exists inside that repo, so whenever I open a terminal inside that repo, I already have present those alias. And if someone forks or clones my project, they already have that alias too thanks to that specific file.
CodePudding user response:
No, it's not possible.
But you can create a script file alias.sh
to set up the alias and instruct users of your repo via README file to source this file once in their terminal session when they need this alias: . ./alias.sh
The file alias.sh
might contain:
#!/bin/sh
alias youralias='your | long | command'
After the file was sourced with . ./alias.sh
, you can simply run youralias
as a standalone command.