You are not logged in.

#1 2022-05-04 17:58:04

kaffeekind
Member
Registered: 2022-05-04
Posts: 8

Unwanted hardlinks to $HOME appearing

Hi,
this is my first post within this community, because I couldn't find anything on this topic. So I hope I do everything correctly.
My problem is that at some time in the past I started to encounter '~' directories within different subdirectories. It is not marked as a symlink by ll and links to my home directory.
Now I know that this "some time in the past" is pretty unspecific, but it didn't bother me enough in the beginning and planned to fix it later. Now it happens more and more often that
I get it has "untracked" in my git status, which annoys me.

Around that time I switched from bash to fish. So I though maybe fish could be the reason, but I couldn't find anything on the fish arch wiki page.
The fish shell starts itself from within the .bashrc and replaces the bash process like explained in the aw:

if [[ $(ps --no-header --pid=$PPID --format=cmd) != "fish" && -z ${BASH_EXECUTION_STRING} ]]
then
  exec fish
fi

Workstation:
Kernel: 5.17.5-5-arch1-1 (multiple arch updates happened, while the problem was still occuring)
Shell: fish
WM: i3
Terminal: alacritty

Thanks for any ideas, I will gladly add helpful information you request.

Offline

#2 2022-05-04 18:11:12

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: Unwanted hardlinks to $HOME appearing

that's not what a hardlink is. What does `file '~'` give you, making sure to use those single quotes.

Offline

#3 2022-05-04 18:36:03

kaffeekind
Member
Registered: 2022-05-04
Posts: 8

Re: Unwanted hardlinks to $HOME appearing

What do you mean "give me"? When I enter cd '~' the result of pwd is /home/user/

Last edited by kaffeekind (2022-05-04 18:36:33)

Offline

#4 2022-05-04 18:39:43

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Unwanted hardlinks to $HOME appearing

Scimmia wrote:

What does `file '~'` give you, making sure to use those single quotes.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2022-05-04 18:48:49

kaffeekind
Member
Registered: 2022-05-04
Posts: 8

Re: Unwanted hardlinks to $HOME appearing

Sry, took me a while. You mean the file command, i guess? It gives me:  ~: directory

Offline

#6 2022-05-04 19:36:51

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,497
Website

Re: Unwanted hardlinks to $HOME appearing

Please post your full shell configs (side note, why are you launchig fish from bash?)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Online

#7 2022-05-04 20:01:47

kaffeekind
Member
Registered: 2022-05-04
Posts: 8

Re: Unwanted hardlinks to $HOME appearing

Which part of the shell config? The .bashrc? All files from ~/.config/fish/ ?

I chose that option because I followed the arch wiki's explanation:

Compared to the following options, this is the most universal solution, since it works both on a local machine and on a SSH server.

Offline

#8 2022-05-04 20:07:53

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Unwanted hardlinks to $HOME appearing

Compared to the following options, this is the most universal solution, since it works both on a local machine and on a SSH server.

Your regular reminder that fish is OMZ for bash.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2022-05-04 20:26:34

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,497
Website

Re: Unwanted hardlinks to $HOME appearing

kaffeekind wrote:

Which part of the shell config?

The whole thing.  For both shells.

As for that section of the wiki - it's wrong - and likely rarely relevant (edit: and the shell pedants among us have discussed it before).

Last edited by Trilby (2022-05-04 21:25:51)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Online

#10 2022-05-04 20:31:38

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,245

Re: Unwanted hardlinks to $HOME appearing

Also check

ls $(pwd)'/~'

the quotes are *important*
I'm pretty convinced that I know what happens, but not through what - and if the shell rc's don't hint at it, the directories content might.

Jason wrote:

Your regular reminder that fish is OMZ for bash.

fish is OMZ for fish tongue

Offline

Board footer

Powered by FluxBB