WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: ashrc alias  (Read 2835 times)

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
ashrc alias
« on: June 18, 2016, 12:53:42 PM »
dCore's  .ashrc  has built-in alias for df, du, ls, cp, mv, rm. Think Tiny Core has a built-in for 'ce=/etc/sysconfig/tcedir/'. Extracted default TC7 core.gz but couldn't actually find where this information comes from, /home is unpopulated, /root has no   .ashrc  , didn't see it in tc-functions...

In dCore i add these to  .ashrc  for quick navigate, as /home, /opt and /tmp are easy this is good:
alias te='cd /etc/sysconfig/tcedir/'
alias se='cd /etc/sysconfig/tcedir/sce/'

Not sure if you want to condsider a couple extra defaults for fresh installs, thanks for consideration.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: ashrc alias
« Reply #1 on: June 18, 2016, 12:58:54 PM »
In TC 7.x x86 it's at  /etc/skel/.ashrc .
In addition to  ce , I've added:
Code: [Select]
alias ce='cd /etc/sysconfig/tcedir'
alias ceo='cd /etc/sysconfig/tcedir/optional'
; )
« Last Edit: June 18, 2016, 01:00:36 PM by Misalf »
Download a copy and keep it handy: Core book ;)

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: ashrc alias
« Reply #2 on: June 18, 2016, 04:17:02 PM »
Thanks Misalf. If a 3 character alias is OK in dCore, 'tce' and 'sce' would be direct and easy too.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: ashrc alias
« Reply #3 on: June 18, 2016, 07:55:34 PM »
It's ok here, makes it nice and easy to cd to those directories and though manual involvement in the scedir is not advised, sce is an alias to cd to it.  I used tce as opposed to ce to cd to the tcedir as to me it was easier to remember though I like to stay in line with Core functions whenever possible.

In the latest RC.



Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: ashrc alias
« Reply #4 on: June 19, 2016, 12:44:58 AM »
Actually,  tce  (to cd to the tce-dir) seems to make much more sense to me than  ce . Or at least it could seem more intuitive. What does  ce  stand for?

Also, I actually have a script for this but it's probably the same for an alias ... something like
Code: [Select]
alias tcz='tce-load -i'
Download a copy and keep it handy: Core book ;)

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: ashrc alias
« Reply #5 on: June 19, 2016, 02:56:12 PM »
Thanks Jason, very nice and intuitive.