Skip to content

Aliases file uses syntax outside guidelines in 'guides' repo #770

@fantismo

Description

@fantismo

Syntax for shell alias does not conform to own guidelines in a neighboring repo.

Syntax recommended by thoughtboot:

Prefer ${var,,} and ${var^^} over tr for changing case.
Prefer ${var//from/to} over sed for simple string replacements.

https://github.com/thoughtbot/guides/tree/main/bash

Syntax used in dotfiles repo:

# Pretty print the path
alias path='echo $PATH | tr -s ":" "\n"'

https://github.com/thoughtbot/dotfiles/blob/main/aliases

Should use Bash substitution rather than calling out to an external command:

alias paths='echo -e ${PATH//:/\\n}'

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions