Skip to content

Commit

Permalink
/ aliases: do not leave the stray loop counter in the environment
Browse files Browse the repository at this point in the history
$i is obviously a common variable that we would use at the shell, we
don't want to leave set in profile scripts as pollution and mess
something up (which it did, leading to finding where it was set and
fixing it in this patch)
  • Loading branch information
smemsh committed Sep 22, 2024
1 parent 4542c16 commit 0804635
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions init.d/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ alias bashrc "reinit "

alias bashver 'echo ${BASH_VERSINFO[@]}'

for ((i = 1; i <= 64; i++)); do
alias $i "fg $i"; done
doaliases ()
{ local i; for ((i = 1; i <= 64; i++)); do alias $i "fg $i"; done; }
doaliases

# "cd -" with less characters and no output
#
Expand Down

0 comments on commit 0804635

Please sign in to comment.