Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logo causes errors #2

Closed
smenzer opened this issue Jul 22, 2020 · 3 comments
Closed

logo causes errors #2

smenzer opened this issue Jul 22, 2020 · 3 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@smenzer
Copy link

smenzer commented Jul 22, 2020

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Run dotman.sh (see below)

$ zsh --version
zsh 5.7.1 (x86_64-apple-darwin19.0)

$ dotman/dotman.sh
dotman/dotman.sh: line 15: unexpected EOF while looking for matching ``'
dotman/dotman.sh: line 272: syntax error: unexpected end of file

$ sh

$ bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)
Copyright (C) 2007 Free Software Foundation, Inc.

$ dotman/dotman.sh
dotman/dotman.sh: line 15: unexpected EOF while looking for matching ``'
dotman/dotman.sh: line 272: syntax error: unexpected end of file

Expected behavior
The menu is shown, no errors appear

Desktop (please complete the following information):

  • OS: Max OSX 10.15.5
  • Bash Version: Bash 3.2.57; zsh 5.7.1
@smenzer smenzer added the bug Something isn't working label Jul 22, 2020
@Bhupesh-V
Copy link
Owner

Can you please verify if the following change works?

DOTMAN_LOGO=$(cat <<- 'LOGO'

      _       _                         
     | |     | |                        
   __| | ___ | |_ _ __ ___   __ _ _ __  
  / _` |/ _ \| __| '_ ` _ \ / _` | '_ \ 
 | (_| | (_) | |_| | | | | | (_| | | | |
  \__,_|\___/ \__|_| |_| |_|\__,_|_| |_|
                                        

LOGO
)

@smenzer
Copy link
Author

smenzer commented Jul 23, 2020

@Bhupesh-V no that's still causing errors:

$ head -n25 dotman.sh
#!/usr/bin/env bash

# (.dot)file (man)ager

IFS=$'\n'

set +x

VERSION="v0.1.0"
DOTMAN_LOGO=$(cat <<- 'LOGO'

      _       _
     | |     | |
   __| | ___ | |_ _ __ ___   __ _ _ __
  / _` |/ _ \| __| '_ ` _ \ / _` | '_ \
 | (_| | (_) | |_| | | | | | (_| | | | |
  \__,_|\___/ \__|_| |_| |_|\__,_|_| |_|


LOGO
)

# check if tput exists
if ! command -v tput &> /dev/null
then

$ ./dotman.sh
./dotman.sh: line 15: unexpected EOF while looking for matching ``'
./dotman.sh: line 272: syntax error: unexpected end of file

@Bhupesh-V Bhupesh-V added the help wanted Extra attention is needed label Jul 23, 2020
@Bhupesh-V Bhupesh-V pinned this issue Jul 26, 2020
@Bhupesh-V
Copy link
Owner

Bhupesh-V commented Aug 11, 2020

Just realized, the error is occurring due to imbalanced ' & `.
Will probably change the logo in next release

How's this for a change? 😅

DOTMAN_LOGO=$(cat << "LOGO"


  ┌┬┐┌──┐┌┬┐┌┬┐┌─┐┌┐┌
   │││🖖│ │ │││├─┤│││
  ─┴┘└──┘ ┴ ┴ ┴┴ ┴┘└┘
                                                               
LOGO
)

Bhupesh-V added a commit that referenced this issue Aug 24, 2020
- use printf instead of here document
- works on Bash 3.2.x
- write changelog
@Bhupesh-V Bhupesh-V self-assigned this Aug 24, 2020
@Bhupesh-V Bhupesh-V unpinned this issue Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants