zsh-users
 help / color / mirror / code / Atom feed
From: David Woodfall <dave@dawoodfall.net>
To: zsh-users@zsh.org
Subject: Re: scp completion options
Date: Mon, 20 Aug 2018 15:51:56 +0100	[thread overview]
Message-ID: <20180820145156.GB27099@blackswan> (raw)
In-Reply-To: <CAH+w=7akhhC6h0nsyZXZvzr1B961Zw1LnvV2qax=6iX4FJ3ZhA@mail.gmail.com>

On Thursday 28 June 2018 17:31,
Bart Schaefer <schaefer@brasslantern.com> put forth the proposition:
> On Thu, Jun 28, 2018 at 1:56 PM, David Woodfall <dave@dawoodfall.net> wrote:
> >
> > Things I've tested so far:
> >
> > [...]
>
> _remote_files is most likely running
>   ssh -o BatchMode=yes -a -x $host ls -d1FL --
> where $host is obviously the remote name.  Try running that directly
> from your command line and see what you get.
>
> Try again replacing "ls" with /bin/ls just in case an alias is somehow
> being invoked, or find out if you have some other "ls" in the default
> search path.

Well I had another look at the problem of those escape characters
today and think that I've found the problem. I made a ssh function
some time ago that would change my screen title to user@host:

ssh() {
  print -n "\ek${*##* }\e\\"
  /usr/bin/ssh $@ 
  print -n \\ek${${(%)SCREEN//screen-*/%~}#\~/}\\e\\\\
}

I didn't realize that scp would also run the ssh binary. I assumed that its
autocomplete stuff was some build-in code.

To get around this I renamed the ssh function to mmmssh and then created

alias ssh='mmmssh'

Aliases are only available in an interactive shell.

Pretty daft way to get a user@host but it works. There's probably a more sane
way to do this.

Thanks for all the help and clues where to look.

-Dave

--

Besides, its really not worthwhile to use more than two times your physical
ram in swap (except in a select few situations). The performance of the system
becomes so abysmal you'd rather heat pins under your toenails while reciting
Windows95 source code and staring at porn flicks of Bob Dole than actually try
to type something.
  -- seen on c.o.l.development.system, about the size of the swap space

                                                            .--.  oo
                                                           (____)//
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'


  parent reply	other threads:[~2018-08-20 15:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180626231957epcas4p275197b8b1b133496936cd1e2a59d15b6@epcas4p2.samsung.com>
2018-06-26 23:06 ` David Woodfall
2018-06-27  8:15   ` Peter Stephenson
2018-06-27 10:13     ` David Woodfall
2018-06-28  8:38       ` Peter Stephenson
2018-06-28 20:14         ` David Woodfall
2018-06-28 20:26           ` Bart Schaefer
2018-06-28 20:56             ` David Woodfall
2018-06-29  0:31               ` Bart Schaefer
2018-06-29  2:31                 ` David Woodfall
2018-08-20 14:51                 ` David Woodfall [this message]
     [not found]   ` <20180627091514.22955a04@camnpupstephen.cam.scsc.local>
2018-06-29  8:33     ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180820145156.GB27099@blackswan \
    --to=dave@dawoodfall.net \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).