[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sourcing a file ending in \<newline> disables aliases for 1 command
From: |
Pedro Gimeno |
Subject: |
Sourcing a file ending in \<newline> disables aliases for 1 command |
Date: |
Thu, 02 Apr 2015 23:40:40 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Icedove/24.7.0 |
Bash Version: 4.2
Patch Level: 37
Release Status: release
Description:
If a file with a command that ends in \<newline> is sourced, the next
command issued in the command line does not interpret aliases but
subsequent ones do. It's a minor issue easy to work around, but since
it's surprising behaviour and some aliases are important, I thought I'd
report it. In the real case where I used it, the command was 'rm' which
was an alias to 'rm -i' to ask for confirmation, and it didn't ask.
Repeat-By:
$ alias hi=echo\ hello
$ echo /bin/true\\ > testbug.sh
$ hi
hello
$ source testbug.sh
$ hi
bash: hi: command not found
$ hi
hello
- Sourcing a file ending in \<newline> disables aliases for 1 command,
Pedro Gimeno <=