[TriLUG] tab completion behavior changes with recent Ubuntu
Mauricio Tavares via TriLUG
trilug at trilug.org
Mon Sep 21 11:40:32 EDT 2020
On Mon, Sep 21, 2020 at 11:32 AM Brian Henning via TriLUG
<trilug at trilug.org> wrote:
>
> Pete,
>
> Why are you using "$HOME" instead of the tilde character? E.g.
>
> $ cp ~/Pictures/<tab><tab>
> For me yields
> [directory listing]
> $ cp ~/Pictures/
>
> I get the same behavior you describe below (the addition of the escape) if I type $HOME. Tilde saves you four keystrokes and works in most[1] shells.
>
> Cheers,
> -Brian
>
> [1] - where "most" is "four": sh, ksh, csh, and bash
>
>
> -----Original Message-----
> From: TriLUG <trilug-bounces+bhenning=pineresearch.com at trilug.org> On Behalf Of Pete Soper via TriLUG
> Sent: Monday, September 21, 2020 10:49 AM
> To: Triangle Linux Users Group General Discussion <trilug at trilug.org>
> Subject: [TriLUG] tab completion behavior changes with recent Ubuntu
>
> Running Ubuntu 18.04.1 with recent updates.
>
> I type this:
>
> /cp $HOME/Pictures//
>
> Then I type "tab", expecting this, as I would see for the last decade or
> two:
>
> /cp $HOME/Pictures/20200921_STM32F031F6P6.jpg/
>
> But instead I see:
>
> /cp \$HOME/Pictures/20200921_STM32F031F6P6.jpg/
>
> So then if I've forgotten the freebee backslash, when I add a period to get the file into my current directory:
>
> /cp \$HOME/Pictures/20200921_STM32F031F6P6.jpg ./
>
> Instead the operation fails as HOME/Pictures isn't valid.
>
> What is causing this and how to I eliminate?
>
> And out of curiosity, how did I accidentally enable this free escape of '$'? Is it a feature somehow?
>
> Thanks,
> Pete
>
>
root at ubuntu18:/# fgrep -i VERSION= /etc/os-release
VERSION="18.04.4 LTS (Bionic Beaver)"
root at ubuntu18:/# cd $HOME
root at ubuntu18:~# pwd
/root
root at ubuntu18:~# history
1 fgrep -i VERSION= /etc/os-release
2 cd $HOME
3 pwd
4 history
root at ubuntu18:~#
root at ubuntu18:/# su - pickles
pickles at ubuntu18:~$ pwd
/home/pickles
pickles at ubuntu18:~$ mkdir wrongplace
pickles at ubuntu18:~$ cd $HOME/wrongplace/
pickles at ubuntu18:~/wrongplace$ echo $HOME
/home/pickles
pickles at ubuntu18:~/wrongplace$ history
1 pwd
2 mkdir wrongplace
3 cd $HOME/wrongplace/
4 echo $HOME
5 history
pickles at ubuntu18:~/wrongplace$
More information about the TriLUG
mailing list