aboutsummaryrefslogtreecommitdiff
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add support for bitbucket.orgEuAndreh2021-06-191-0/+8
|
* Add support for pagure.ioEuAndreh2021-06-191-0/+7
| | | | | | | | | | | | | I only added support for HTTPS remotes, because I'm not willing to go out of my way for creating a Fedora account just to see what an SSH URL looks like. I guess just the prefix would change, but repositories not named "A/B.git" but just "B.git" would need more (trivial) treatment, which I'm not willing to do. It shall stay this way until a contribution comes to improve it, or Pagure stops making it hard for me to implement this.
* Add support for codeberg.orgEuAndreh2021-06-191-0/+8
|
* Add support for notabug.orgEuAndreh2021-06-191-21/+31
|
* Leverage po4a to translate manpagesEuAndreh2021-06-191-2/+2
|
* src/git-permalink.sh: Translate program output to pt, fr and eoEuAndreh2021-06-171-13/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The choice of implementation was very basic: Use strings in the script itself rather than relying on external tools. Compared to a compiled C program using, say, gettext.3, an sh script could also depend on it, but at runtime. An equivalent C code would require the gettext.3 dependency, but at compile time. After compilation, the code required for doing the translation is already on the binary, while an sh script would need gettext.1 to run gettext.1 commands while it executes, such as "gettext -s 'MSG_ABC'". Bash has a very appealing feature: using $"" does a lookup and translates the string. In other words, $"" runs gettext for you, without the script requiring gettext.1, just Bash. As tempting as it was, I chose not to rely on Bash. I preferred the cost of an ad-hoc solution over requiring Bash over POSIX sh. The final solution is simple enough for the git-permalink.1 program, but wouldn't scale for bigger scripts. Strings are placed together for translation, and no external tool is used for this. Due to the way that strings are now given to printf.1, ShellCheck complains a lot about those strings, alonside saying that the string translation variables are unused. They actually are used, but hidden behind an eval. Overall I'm satisfied with the solution, but I probably won't follow the same path for the manpages, and will choose something like po4a for it, instead.
* Show -h and -V flags on usage textEuAndreh2021-06-161-1/+1
|
* src/git-permalink.sh: Fix bad treatment of -p flagEuAndreh2021-06-121-14/+15
|
* src/git-permalink.sh: Fix ShellCheck errorsEuAndreh2021-06-121-1/+4
|
* TODOs.md: Support URL overrides via "git config git-permalink"EuAndreh2021-06-121-22/+31
|
* src/git-permalink.sh: Add -p, -V|--version and -h|--help flagsEuAndreh2021-06-121-5/+43
|
* src/git-permalink.sh: First working versionEuAndreh2021-06-121-7/+76
|
* mv scripts/git-permalink.in src/git-permalink.shEuAndreh2021-06-121-0/+18