I agree that's the generic way forward for safe-rm in light of usrmerge but did not feel it was right to make up such a path in Ubuntu. I'm happy with such a solution for Debian, and for Ubuntu. I'm off for two weeks, but will migrate Ubuntu over to that if and when available for merging/syncing into Ubuntu.
Sorry for top post. Writing from phone. On Sun, 5 Aug 2018, 00:21 Francois Marier, <franc...@debian.org> wrote: > I took a look at the details of the diversion that the latest version of > dash sets up and it's really quite complicated. It's not clear that I could > easily get it right, even copying that code, and the consequences of > getting > it wrong could be disastrous. > > So instead I went for an easier approach: install the rm symlink in > /usr/share/safe-rm/bin/ and then add that to the front of the PATH in > /etc/profile.d/safe-rm.sh. > > That seems to work both for login shells (on a virtual terminal) and for > interactive shells (e.g. gnome-terminal) after logging out and logging back > in. > > The downside is that it may not for shells which are not Bourne-compatible. > I believe it works in bash, dash, ksh and zsh, but I could be wrong. I'm > happy to accept patches to make it work on other shells of course. > > Francois > > -- > https://fmarier.org/ >