help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Current working directory echoed to the terminal


From: Chris Jones
Subject: Re: [Help-bash] Current working directory echoed to the terminal
Date: Mon, 16 Apr 2012 16:30:37 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

On Sun, Apr 15, 2012 at 08:15:12PM EDT, Bob Proulx wrote:
> Chris Jones wrote:
> > Bob Proulx wrote:

[..]

> You could avoid loading bash_completion, perhaps uninstalling it.  But
> it is very useful and addicting to have available.

I use it a lot myself, but what happens once you are ‘addicted’ and you
login to a remote host where it is not configured..? ;-)

I think we're saying the same thing: 

When I wrote ‘out of curiosity’ in my initial post, I probably also
meant that I never liked this BASH_ENV business and felt it was time to
revisit.

Based on your remarks, I put together a.. ‘solution’:

- script#1  populates a directory with symbolic links to script#2 and
  adds this directory to the end of the PATH environment variable. The
  links have the same names as my aliases & functions. It runs whenever
  I start a Vim session.

- script#2 sources aliases/functions & proceeds to run whatever is in
  "$0" with the arguments in "$*"

It was rather fun getting this to work but rewriting it in a reasonably
robust manner would be a lot less fun. Looks like an accident waiting to
happen and I don't think I'm prepared to live with it.

Since this is only of interest in Vim, I feel that rather than messing
with bash, that's where the solution should be implemented.

I'm trying to figure out a way to trap ‘:!’ bash commands issued from
Vim and give control to a script that handles shell invocation with more
flexibility than the ‘shell=’ and ‘shellcmdflag=’ options.

CJ

-- 
Have a nice day!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]