Re: Expanding aliases to full command before execution

2012-04-06 Thread Linda Walsh
Greg Wooledge wrote: On Wed, Apr 04, 2012 at 04:08:04PM -0700, Linda Walsh wrote: function ll { ... } Just for the record, a one-line function definition requires a ; before the closing curly brace. ll() { ls -l "$@";} --- Can you say 'irrelevant detail'? I was discussing an

Re: Expanding aliases to full command before execution

2012-04-05 Thread Greg Wooledge
On Wed, Apr 04, 2012 at 04:08:04PM -0700, Linda Walsh wrote: > function ll { ls -l "$@"} Just for the record, a one-line function definition requires a ; before the closing curly brace. ll() { ls -l "$@";}

Re: Expanding aliases to full command before execution

2012-04-04 Thread jrrand...@gmail.com
On Tue, Apr 3, 2012 at 5:22 PM, jrrand...@gmail.com wrote: > Hi everyone, > > In bash, is it possible to expand my aliases either before they are executed > or when they are stored in the history file? > For example, if I have:  alias ll='ls -l'  defined in my .bashrc, when I > execute "ll" from t

Re: Expanding aliases to full command before execution

2012-04-04 Thread Linda Walsh
jrrand...@gmail.com wrote: function expand_alias() # expand an alias to full command { if [ "$1" = "." ]; then argument="\\$1" else argument="$1" fi match=$( alias -p | grep -w "alias $argument=" ) if [ -n "$match" ]; then expanded="`

Re: Expanding aliases to full command before execution

2012-04-04 Thread dethrophes
Am 04.04.2012 17:27, schrieb jrrand...@gmail.com: On Tue, Apr 3, 2012 at 5:22 PM, jrrand...@gmail.com wrote: Hi everyone, In bash, is it possible to expand my aliases either before they are executed or when they are stored in the history file? For example, if I have: alias ll='ls -l' defined

Re: Expanding aliases to full command before execution

2012-04-03 Thread Steven W. Orr
On 4/3/2012 5:22 PM, jrrand...@gmail.com wrote: Hi everyone, In bash, is it possible to expand my aliases either before they are executed or when they are stored in the history file? For example, if I have: alias ll='ls -l' defined in my .bashrc, when I execute "ll" from the command line, I'd

Expanding aliases to full command before execution

2012-04-03 Thread jrrand...@gmail.com
Hi everyone, In bash, is it possible to expand my aliases either before they are executed or when they are stored in the history file? For example, if I have: alias ll='ls -l' defined in my .bashrc, when I execute "ll" from the command line, I'd like my history file to contain "ls -l". Is there