WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: ashrc aliases  (Read 4501 times)

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
ashrc aliases
« on: March 28, 2011, 05:18:47 PM »
In my view prompting for overwrites is generally OK in order to create less frustration for new users, but if you rely on this and switch back to some debian you may lose all your files :)

Scripts may also rely on standard cp behaviour and you can see that even in tc base we have to hack around this problem by running the yes command every single time we use cp.

tldr: sh aliases are annoying and should only be set by the user itself.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: ashrc aliases
« Reply #1 on: March 28, 2011, 06:28:42 PM »
Whilst I agree that it can be quite annoying to be treated like a newbie (with having to answer with YES) there are (at least) two ways to overcome this "nuisance" (without changing '~/.ashrc'):
  • either use the '-f' option to force an overwrite (e.g. cp -f new old), or
  • avoid the alias by spelling out exactly which 'cp' command is to be used (e.g. via /bin/cp new old).

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: ashrc aliases
« Reply #2 on: March 28, 2011, 07:17:56 PM »
Anyone capable of using a backup would edit to suit.
No need to accept defaults unless you boot from CD and/or choose not to use a backup.
10+ Years Contributing to Linux Open Source Projects.

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: ashrc aliases
« Reply #3 on: March 28, 2011, 08:09:31 PM »
With my objections in mind do you really think this is a sane default?

Offline cosmin_ap

  • Newbie
  • *
  • Posts: 48
Re: ashrc aliases
« Reply #4 on: May 30, 2011, 03:13:55 AM »
Btw, what about moving bash aliases from /usr/local/etc/bashrc to /etc/skel/.bashrc? It would be consistent with the way ash is configured (not sure how bad would that affect existing users though).

Another suggestion (I remember seeing this already but can't find the link right now) would be to have one ~/.aliases for both ash and bash, and then an user would just empty that file from its home dir and be done with it if it doesn't like aliases :)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: ashrc aliases
« Reply #5 on: May 31, 2011, 07:20:35 PM »
Btw, what about moving bash aliases from /usr/local/etc/bashrc to /etc/skel/.bashrc? It would be consistent with the way ash is configured (not sure how bad would that affect existing users though).

Another suggestion (I remember seeing this already but can't find the link right now) would be to have one ~/.aliases for both ash and bash, and then an user would just empty that file from its home dir and be done with it if it doesn't like aliases :)
 

Sounds like a bad idea to me mess with the clear current distinguishing between base and optional extensions, that is one of the aspects of TC I have come to appreciate.

Particularly starting to place a file of an extension into /etc/skel might be setting a doubtable precedence.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline cosmin_ap

  • Newbie
  • *
  • Posts: 48
Re: ashrc aliases
« Reply #6 on: June 01, 2011, 06:08:31 AM »
the question it boils down to is this: is it a goal of tinycore to have extensions that work out of the box? if yes, then they need to have a way to integrate with the shared aspects of the system at the time of install and /etc/skel and ~/.aliases are shared resources.

if I install extension X which needs a default config file in each users' home directory to run, then that extension needs to write in /etc/skel (or in /usr/local/etc/skel and make adduser a wrapper that uses that directory), and even write to existing homes at the time of install (I see how that could be considered too intrusive though, especially when /home is persistent but you want to try out some extensions which don't have a way to ask you to cleanup up after themselves).

now ~/.aliases is definitely a user thing and not a distro thing (think of a portable home directory), while /etc/aliases is the distro thing, and /usr/local/etc/bash/aliases is the extension thing -- as long as there's a separation between the three and extension people know about it, i see no problems. what do you think?


Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: ashrc aliases
« Reply #7 on: June 01, 2011, 10:17:05 PM »
Before this I didn't even know what skel is...