Re:Dwarf Fortress starting during apt-get upgrade
by pwdisswordfish on Wednesday August 16, 2017 @09:55AM
(#15027443)
> this still means user can't use system's `df` easily
\df
There you go.
Re:Dwarf Fortress starting during apt-get upgrade
by oelmekki on Wednesday August 16, 2017 @10:01AM
(#15027493)
Awesome, didn't know about that. Thanks!
Re:Dwarf Fortress starting during apt-get upgrade
by AndrewOMartin on Wednesday August 16, 2017 @09:31AM
(#15027264)
They could still type /bin/df, and they could also use:
alias freespace=/bin/df
Though then they'd have to uninstall FreeSpace 2.
Re:Dwarf Fortress starting during apt-get upgrade
by cpach on Wednesday August 16, 2017 @09:19AM
(#15027188)
Why not name the alias something else than “df”? :) dfortress or something like that. Then it won’t collide with df(1).
Re:Dwarf Fortress starting during apt-get upgrade
by oelmekki on Wednesday August 16, 2017 @09:26AM
(#15027222)
This is by far the best approach, yes :)
My point was more to show a way this particular user could have achieved the same result without their problem.
Plus, we can't expect users to know all the system tools, this is a good way to isolate "user space" from "system space", so I guess taking the habit to use aliases rather than putting things in `/usr/local/bin/` makes sense by itself (except when we want indeed to override an executable provided by system, or we want indeed to provide a new system tool).
Many use aliases only to specify default command parameters, but it works just as well to provide an execution path, like, in this case:
It would only be executed in interactive sessions, this way, which should guard well enough against system code interpreting it.Of course, this still means user can't use system's `df` easily, but I guess they don't use it anyway since they did not realize the problem until that upgrade.