Remove usage of HEREDOC in favor of `printf` while printing `--help` text

#67 · closed · 5 comments

View on GitHub ↗

Bhupesh-V

### Is your feature request related to a problem? Please describe. - Currently, while showing help text, we rely on bash HEREDOCS. This can also be achieved using multiple `printf` commands one-by-one. - Doing this helps us remove the reliance on `cat` command altogether from the script. ### Describe the solution you'd like Use printf variations like this for the entirety of the help text ``` printf "\n%s\n" "Contact 📬️: $(tput bold)[email protected]${RESET} for assistance" ``` ### Describe alternatives you've considered _No response_

Comments

T-Joseph-Kim

Hello I am a beginner to open source contributions, I would like to help with this issue. Is the issue located in the "ugit" bash file? Can I be assigned for this issue?

Bhupesh-V

> Hello I am a beginner to open source contributions, I would like to help with this issue. Is the issue located in the "ugit" bash file? Can I be assigned for this issue? Hey, yes its located in the ugit bash file. Welcome to foss. I will assign the issue to you. Let me know if you need any help

T-Joseph-Kim

@Bhupesh-V Hello again! I am trying to install ugit on windows and I have Git Bash, Git, and fzf correctly installed. I cloned the repo using "git clone https://github.com/Bhupesh-V/ugit.git" but I try the "ugit" command and my git bash terminal states that the command is not found. Is there something I am missing? Thank you in advance. ![image](https://github.com/Bhupesh-V/ugit/assets/116681578/04153259-33bf-4f4a-a8df-926f19b7aea9)

Bhupesh-V

> @Bhupesh-V Hello again! I am trying to install ugit on windows and I have Git Bash, Git, and fzf correctly installed. I cloned the repo using "git clone https://github.com/Bhupesh-V/ugit.git" but I try the "ugit" command and my git bash terminal states that the command is not found. Is there something I am missing? > > Thank you in advance. ![image](https://private-user-images.githubusercontent.com/116681578/301299424-04153259-33bf-4f4a-a8df-926f19b7aea9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDY3OTU2MzAsIm5iZiI6MTcwNjc5NTMzMCwicGF0aCI6Ii8xMTY2ODE1NzgvMzAxMjk5NDI0LTA0MTUzMjU5LTMzYmYtNGY0YS1hOGRmLTkyNmYxOWI3YWVhOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwMjAxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDIwMVQxMzQ4NTBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00NDNiYjE1NzFkNDMxZGY1MmJlZTA2MWZiY2FmYTkwOTRhNTgyODEwZWQzMmE2YTgwZmQxODFiM2QxZDE5YTQ5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.Ud7PBzOZmTt3p9YMfiBgR-rEyZWmb3K50j7uNCAEuxg) Hey. 1. Check if bash is available in your PATH. If not, please add that. 2. Since you have ugit cloned locally, use `bash ugit` to execute the script. Ref :https://www.thewindowsclub.com/how-to-run-sh-or-shell-script-file-in-windows-10

T-Joseph-Kim

Thank you for the help! I completed my pull request, please let me know if any more changes need to be made for this issue.