Re: How to run something before invoking the inputted command?

2010-07-12 Thread Clark J. Wang
> > Personally I've never found any use for PROMPT_COMMAND. It seems klunky > and awkward. > My PS1 depends much on PROMPT_COMMAND. For example, my PROMPT_COMMAND will trim very long $PWD to a shorter one (depends on the window size of current terminal): [r...@server ~/directory/lng/very

Re: how to limit autofill of executables in 'cygwin-bash' to a list of 'extensions'

2010-07-12 Thread Chet Ramey
On 7/12/10 6:18 PM, Linda Walsh wrote: > I have a long standing problem under cygwin in that when I type > a prefix of 1 or more executables and hit the expand character (ESC), > it lists out all the DLL's in my system path. > > I NEVER want to execute libraries directly. Many or most are > not e

how to limit autofill of executables in 'cygwin-bash' to a list of 'extensions'

2010-07-12 Thread Linda Walsh
I have a long standing problem under cygwin in that when I type a prefix of 1 or more executables and hit the expand character (ESC), it lists out all the DLL's in my system path. I NEVER want to execute libraries directly. Many or most are not executables -- yet bash lists them. In Windows, th

Re: How to run something before invoking the inputted command?

2010-07-12 Thread Andreas Schwab
"Clark J. Wang" writes: > For example, in the interactive shell, I want to track the time when every > inputted command is invoked. So I want to run a `date' command before > actually invoking the inputted command. For now I have to do like this: > > $ date; command1 > $ date; command2 > > Is the

Re: How to run something before invoking the inputted command?

2010-07-12 Thread Dave Rutherford
On Mon, Jul 12, 2010 at 08:16, Greg Wooledge wrote: >> On Sat, Jul 10, 2010 at 11:30 AM, Eric Blake wrote: >> > Not quite before the command, but it is very easy to include $(date) as >> > part of PS1 to have a timestamp listed in the prompt that is printed >> > after every command. > > On Sat, J

Re: How to run something before invoking the inputted command?

2010-07-12 Thread Greg Wooledge
On Sat, Jul 10, 2010 at 11:22:27AM +0800, Clark J. Wang wrote: > For example, in the interactive shell, I want to track the time when every > inputted command is invoked. So I want to run a `date' command before > actually invoking the inputted command. For now I have to do like this: > > $ date;

Re: Naming convention of bash script filenames

2010-07-12 Thread Andreas Schwab
Bob Proulx writes: > For an executable script I use no suffix at all. It matters not if > the script is a bash script, sh, ksh, perl, ruby, or whatever. Assuming it uses the appropriate shebang. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756