View Issue Details

IDProjectCategoryView StatusLast Update
0000107tcshgeneralpublic2010-09-03 13:20
ReporterMichal Szymanski 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version6.17.00 
Target VersionFixed in Version 
Summary0000107: strange interaction: history - compound aliases
DescriptionAliases including "if..then..else" command insert strange items into history.
  alias c 'if ( x\!:1:e != x ) then \
                gcc \!* -O -s -o \!:1:t:r -lm \
                else \
                echo "\!:1 - bad input file" \
                endif'
Firstly, alias expansion is "verbose", ie. it echoes the expanded command before it is executed.
Secondly, it inserts expanded commands into the history (which is not true for simple aliases and IMHO should not be done) and does it in a strange way (if the condition is true, the "else" command gets into the history and vice versa).

Aliases with "simple if", e.g.
  alias for 'if ( x\!:1:e != x ) g77 \!* -O -s -o \!:1:t:r'
work fine if the condition is true (no echo, alias itself in the history) but if it is false, the history is totally cleared.
TagsNo tags attached.

Relationships

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2010-09-03 13:20 Michal Szymanski New Issue