[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: trouble porting csh alais
From: |
Chet Ramey |
Subject: |
Re: trouble porting csh alais |
Date: |
Mon, 19 May 2003 16:48:34 -0400 |
> The gnu.bash.bug newsgroup seems to be dormant and I can't find an answer to
> this one by google, so here goes.
>
> When using csh I have an alias "alias v \!vi"
> This allows me to re-edit the same file I last edited by just typing "v"
>
> I tried recasting this for bash without success.
You won't have any doing it directly. History expansion is performed before
alias expansion; even using the correct syntax would result in
`bash: !vi: command not found'.
You can, however, use the `fc' command:
alias v='fc -s vi'
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
Chet Ramey, ITS, CWRU chet@po.CWRU.Edu http://cnswww.cns.cwru.edu/~chet/