Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #234131

Re: .profile not being src'd at login on uptodate buster

From David Wright <deblis@lionunicorn.co.uk>
Newsgroups linux.debian.user
Subject Re: .profile not being src'd at login on uptodate buster
Date 2021-04-12 17:20 +0200
Message-ID <C36w1-8T-1@gated-at.bofh.it> (permalink)
References (5 earlier) <C1odI-1jt-5@gated-at.bofh.it> <C2qwN-7HS-5@gated-at.bofh.it> <C2qZP-7RB-1@gated-at.bofh.it> <C2J6q-2mz-5@gated-at.bofh.it> <C2Jzr-2vU-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun 11 Apr 2021 at 10:45:22 (-0400), Greg Wooledge wrote:
> On Sun, Apr 11, 2021 at 09:10:24AM -0500, David Wright wrote:
> > For stdout, the problem is more serious. Every time you press TAB
> > expecting remote filename completion, you receive the profile output
> > from the other end, double-escaped (so a forest of backslashes).
> 
> ...?  What the *hell* are you even doing?

Steady on—you're the one who wrote "Profiles that scribble to stdout
or stderr during login can break things like scp."

I agreed with you, but Lee asked "Can you give an example of profiles
that scribble to stderr during login breaking things like scp?
I've tried to create that situation, but can't."

You replied "Maybe you're right.  I haven't touched that stuff in many
years, so I might be repeating outdated advice, or I might have been
making incorrect assumptions all along."

So I temporarily modified my .bashrc to output, in turn, on stderr
and stdout, just as a demonstration of what could happen, for Lee.
That's what we do here.

> Is this some sort of bash-completion nonsense?  It's gotta be.
> 
> So, yeah, if you're actually using bash-completion (*shudder*)

Isn't that something of a value judgment?

I think we can agree that we all use bash completion, even if
we don't use bash-completion itself. We interrogate and complete
filenames by pressing TAB, yes?

> and if
> your bash-completion is set up to issue ssh commands to retrieve the
> names of remote files while you type,

It's not "my bash-completion", but just the regular Debian package.
I use it exactly how it comes out of the tin. (Obviously one needs
to be using ssh keys rather than passwords, if anybody is thinking
of trying this out.)

Without bash-completion, when you type, say,

$ scp -p foo someuser@somehost:bar

and press TAB, what happens? The partial string "bar" gets matched
against filenames that bash sees on the *local* machine. Where's
the much-vaunted Network Transparency in that? I want to complete
filenames and directories with those that exist on the remote host.

Similarly, without bash-completion, you can type:

$ scp -p someuser@somehost:bar

but TAB won't be able to help you find a file you haven't got, but
only to match ones you already have.

Normal completion by bash doesn't give you that network transparency,
bash-completion does.

> then having unprotected noisy
> commands in your dot files is an *extremely* bad idea.

Correct, QED.

Cheers,
David.

Back to linux.debian.user | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

.profile not being src'd at login on uptodate buster Gene Heskett <gheskett@shentel.net> - 2021-04-07 14:20 +0200
  Re: .profile not being src'd at login on uptodate buster IL Ka <kazakevichilya@gmail.com> - 2021-04-07 14:30 +0200
    Re: .profile not being src'd at login on uptodate buster Gene Heskett <gheskett@shentel.net> - 2021-04-07 17:30 +0200
    Re: .profile not being src'd at login on uptodate buster Gene Heskett <gheskett@shentel.net> - 2021-04-07 17:40 +0200
  Re: .profile not being src'd at login on uptodate buster Greg Wooledge <greg@wooledge.org> - 2021-04-07 14:40 +0200
  Re: .profile not being src'd at login on uptodate buster David Wright <deblis@lionunicorn.co.uk> - 2021-04-07 17:10 +0200
  Re: .profile not being src'd at login on uptodate buster Lee <ler762@gmail.com> - 2021-04-07 17:20 +0200
    Re: .profile not being src'd at login on uptodate buster Greg Wooledge <greg@wooledge.org> - 2021-04-07 17:40 +0200
      Re: .profile not being src'd at login on uptodate buster David Wright <deblis@lionunicorn.co.uk> - 2021-04-07 18:40 +0200
        Re: .profile not being src'd at login on uptodate buster Marco Ippolito <maroloccio@gmail.com> - 2021-04-07 23:20 +0200
          Re: .profile not being src'd at login on uptodate buster Lee <ler762@gmail.com> - 2021-04-07 23:50 +0200
            Re: .profile not being src'd at login on uptodate buster Marco Ippolito <maroloccio@gmail.com> - 2021-04-08 14:30 +0200
            Re: .profile not being src'd at login on uptodate buster David Wright <deblis@lionunicorn.co.uk> - 2021-04-10 20:30 +0200
              Re: .profile not being src'd at login on uptodate buster Lee <ler762@gmail.com> - 2021-04-10 21:00 +0200
                Re: .profile not being src'd at login on uptodate buster Greg Wooledge <greg@wooledge.org> - 2021-04-10 21:30 +0200
                Re: .profile not being src'd at login on uptodate buster David Wright <deblis@lionunicorn.co.uk> - 2021-04-11 16:20 +0200
                Re: .profile not being src'd at login on uptodate buster Greg Wooledge <greg@wooledge.org> - 2021-04-11 16:50 +0200
                Re: .profile not being src'd at login on uptodate buster Lee <ler762@gmail.com> - 2021-04-11 19:10 +0200
                Re: .profile not being src'd at login on uptodate buster Greg Wooledge <greg@wooledge.org> - 2021-04-11 20:00 +0200
                Re: .profile not being src'd at login on uptodate buster David Wright <deblis@lionunicorn.co.uk> - 2021-04-12 17:20 +0200
                Re: .profile not being src'd at login on uptodate buster Greg Wooledge <greg@wooledge.org> - 2021-04-12 17:30 +0200
                Re: .profile not being src'd at login on uptodate buster David Wright <deblis@lionunicorn.co.uk> - 2021-04-12 18:10 +0200
                Re: .profile not being src'd at login on uptodate buster David Wright <deblis@lionunicorn.co.uk> - 2021-04-11 16:20 +0200
                Re: .profile not being src'd at login on uptodate buster Greg Wooledge <greg@wooledge.org> - 2021-04-11 16:50 +0200
                Re: .profile not being src'd at login on uptodate buster David Wright <deblis@lionunicorn.co.uk> - 2021-04-12 17:20 +0200
      Re: .profile not being src'd at login on uptodate buster Lee <ler762@gmail.com> - 2021-04-07 23:50 +0200
        Re: .profile not being src'd at login on uptodate buster Greg Wooledge <greg@wooledge.org> - 2021-04-08 00:10 +0200
          Re: .profile not being src'd at login on uptodate buster Curt <curty@free.fr> - 2021-04-08 10:20 +0200
            Re: .profile not being src'd at login on uptodate buster Tixy <tixy@yxit.co.uk> - 2021-04-08 12:20 +0200
              Re: .profile not being src'd at login on uptodate buster Greg Wooledge <greg@wooledge.org> - 2021-04-08 13:30 +0200
            Re: .profile not being src'd at login on uptodate buster Greg Wooledge <greg@wooledge.org> - 2021-04-08 13:40 +0200

csiph-web