Skip to content

Commit ad94672

Browse files
committed
Refactor the path alias
Before, we called out to `tr` when pretty-printing `PATH` via the `path` alias. There was no need for us to do this because we could have used Bash substitution instead. We refactored the `path` alias to do so. [GitHub](#770)
1 parent 35dbcdf commit ad94672

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aliases

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ alias migrate="bin/rails db:migrate db:rollback && bin/rails db:migrate db:test:
1313
alias s="rspec"
1414

1515
# Pretty print the path
16-
alias path='echo $PATH | tr -s ":" "\n"'
16+
alias path='echo -e ${PATH//:/\\n}'
1717

1818
# Easier navigation: ..., ...., ....., and -
1919
alias ...="cd ../.."

0 commit comments

Comments
 (0)