githubnext / monaspace

An innovative superfamily of fonts for code
https://monaspace.githubnext.com
SIL Open Font License 1.1
13.14k stars 219 forks source link

=~ on bash #144

Closed massimo-cassandro closed 1 month ago

massimo-cassandro commented 7 months ago

I think that the =~ sequence may create confusione in bash scripts, when the ~ character is used to reference the user home dir:

MYPATH=~/path/to/something

becomes

Screenshot 2023-11-20 alle 09 51 33

Could it be useful to create new ligatures sets for this?

MoshiBin commented 7 months ago

I personally recommend against using ~ in scripts like that, as it makes it harder to quote the path, which is useful if the path possibly includes spaces or special characters.

# not ideal - breaks on spaces and some special characters
MYPATH=~/path/to/something

# not ideal - stores the actual tilde (~) character
MYPATH="~/path/to/something"

# better - more resilient against spaces and special chars
MYPATH="$HOME/path/to/something"
idan commented 1 month ago

Fixed in ca8015b27bdc6d8e1201b1ad722f4ae3c38970d0