The VSIDO default aliases co-ordination thread.

Digit

ok, to my surprise i was kinda handed the job of being the guy to define the default vsido command aliases.

so since i'm not so full of myself to think i have the best ideas (because what an awesome lil crowd we have here), i thought it appropriate to make my effort more a "compiling the good ideas from everyone" than a "coming up with the good ideas by myself".

to be clear, the purpose of this thread, is not the same as aliases you use.  the purpose is to come up with a healthy, advantageous, robust and sane set of aliases worthy of giving out to everyone as a default.  (though feel free to pluck worthy aliases from the aliases you use thread, ~ i'll certainly be having another look at it later too.)

so... here's what we have so far...

(work in progress, will attempt to make it well organised enough for clarity, including enough 'system' to allow users to extrapolate.)


alias up='sudo apt-get update && sudo apt-get dist-upgrade'
alias get='sudo apt-get install'
alias rem='sudo apt-get autoremove'
alias cl='sudo apt-get autoclean'
alias se='apt-cache policy'
alias upg='sudo update-grub'
alias grc='ps aux | grep'
alias re='source ~/.bashrc'
alias cd..='cd ..'
alias md=mkdir
alias sdn='sudo shutdown -h now'
alias prg="sudo apt-get purge"
alias ls='ls -F --color --group-directories-first'
alias l="ls -lha"
alias c='clear'  #necessary?  c ENTER is better than CTRL l ?
alias q='exit'
alias s='sudo'
alias al='cat ~/.bash_aliases'
alias muz='cd $HOME/music && gyts'
alias fin='find . | grep -i -s -e "$@"'
alias lxterm='lxterminal'

######################################################
############# Abbreviated apt Commands ################
######################################################

#these are very useful if you know your apt commands already.
#tip: agu, agi, agr, acs, and agdu, are likely the one's you'll first want.

alias agi='sudo apt-get install'
alias agir='sudo apt-get install --reinstall'
alias agfi='sudo apt-get -f install'
alias agr='sudo apt-get remove'
alias agpr='sudo apt-get --purge remove'
alias agp='sudo apt-get purge'
alias acs='apt-cache search'
alias acsi='apt-cache --installed search'
alias agu='sudo apt-get update'
alias agup='sudo apt-get upgrade'
alias agdu='sudo apt-get dist-upgrade'
alias agar='sudo apt-get autoremove'
alias agarp='sudo apt-get autoremove --purge'
alias agc='sudo apt-get clean'
alias agac='sudo apt-get autoclean'                                                                                                                                           
alias acp='sudo apt-cache policy'
alias agka='sudo apt-key add - '
alias aar='sudo add-apt-repository'

######################################################
######### Aliases for setting the background ##############
######################################################

alias fehb='feh --bg-scale' #fehb defaults to feb --bg-scale, change to pref
alias fehbs='feh --bg-scale'
alias fehbc='feh --bg-center'
alias fehbf='feh --bg-fill'
alias fehbm='feh --bg-max'
alias fehbt='feh --bg-tile'


######################################################
############## terminal color aliases ###################
######################################################

alias listtermcolors='(x=`tput op` y=`printf %76s`;for i in {0..256};do o=00$i;echo -e ${o:${#o}-3:3} `tput setaf $i;tput setab $i`${y// /=}$x;done)'
alias graphtermcolors='~/bin/colortable.sh'

#####################################################
############# file management aliases ###################
######################################################

alias big='ls -laSh | head'  #show the top ten biggest files in current dir
alias latest='ls -lhart'

#cant see the forest for the trees (install tree too, its nice)
alias forest="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/   /' -e 's/-/|/'"

######################################################
############# statmonkey's aliases #####################
######################################################

alias did='sudo ls -l /dev/disk/by-id/*'
alias tr='sudo find / -type d -name *Trash*' # find all your trash files
alias rb='exec bash'      # restart bash environment
alias hb='history|more'            # get a listing of your bash history
alias path='echo -e ${PATH//:/\\n}' #lists out your path var
alias atoz="mkdir {A..Z}" #create a to z folders
alias uuid='ls -al /dev/disk/by-uuid/*' # List drives by uuid
alias netmap='nmap 192.168.0-1.0-255 -sP' # get a complete netmap requires nmap

######################################################
############## VastOne's Added Aliases ##################
######################################################
alias sl="sudo medit /etc/apt/sources.list"
alias reinstall='sudo apt-get install --reinstall'
alias finstall='sudo apt-get -f install'
#alias agp='sudo apt-get autoremove --purge' #conflicts apt-get purge.  try agarp
alias add='sudo add-apt-repository'
alias install-norec='sudo apt-get install --no-install-recommends'
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias addgpg='sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys'
alias addkey='sudo gpg --keyserver subkeys.pgp.net --recv'
alias expkey='gpg --export --armor'
alias keyadd='sudo apt-key add - '
alias sfonts='sudo fc-cache -fv'
alias fonts='fc-cache -fv'
alias da='date "+%a, %b %d, %Y [%I:%M %P]"'
alias dat='date "+%A, %B %d, %Y [%I:%M %P]"'

######################################################
############ Non-INXI system info Aliases #################
######################################################

alias running='PS_FORMAT="user,pid,pcpu,pmem,start,args" ps axf' #that wise?

######################################################
############### Various INXI Aliases #################
######################################################
####################### Short ########################
alias s11='inxi -Fz -c6' ## filtered
alias S11='inxi -F -c6' ## not filtered
####################### Full #########################
alias SYS='inxi -ACDfGIpluNrsSt cm3 -x -v7 -c6' ## not filtered
alias sys='inxi -ACDfGIpluNrsSt cm3 -x -v7 -c6 -z' ## Filtered
####################### Pieces #######################
alias aud='inxi -A -x -c6'
alias cpu='inxi -Cf -x -c6'
alias hdd='inxi -Dd -x -c6'
alias mac='inxi -M -x -c6'
alias net='inxi -N -x -c6'
alias par='inxi -plu -x -c6'
alias sen='inxi -s -x -c6'
alias gfx='inxi -Gx -x -c6'


so, with a mind to aliases useful to all, not just our own itches, please, provide some suggestions... and dont be upset when/if this list starts getting edited down to avoid absurdity or conflicts.   :)   we cant just keep adding everyone's... can we?   

typical approach i plan to take with this is to prioritize towards the systematic, e.g. where i have commented out VastOne's "agp", favouring the naming system of merely abbreviating the apt commands, such that agp means apt-get purge, and thus agarp is there to do the apt-get autoremove purge.   

^ this is only so far as there's overlap.   of course it makes sense to keep a lot of the aliases more human, than systematic.   like, i'm not going to write a load of other aliases for the inxi stuff, ... gfx of course is preferred over iGxc6.

but why system > human?   hey, it worked for chemistry (for the most part), and enables you to know thousands from knowing just enough to have grokked the system.   compared to the library of arbitrary chemical names prior to systematizing, it's just better.   ;)  ... mostly.

oh, and from time to time i may throw a comment in there querying an alias (like c=clear)... such comments i dont intend to keep.  only until certainty over an alias.

(and as VastOne said in his post bellow, dont be shy about suggesting ones for stuff that's not in vsido by default, so long as they make sense, and we can make them fit in, they wont hurt to have)

with that all said, please do fire away, not only with suggestions of what to add, but what to change, how to arrange, rearange, reoraganise, refactorise, recomment, etc.   and of course point out any conflicting overlaps i have missed!



thnx.

VastOne

I lub this!  As far as what I have used and gotten used to, I like your approach much better with the exact abbreviations to what you are doing

I encourage everyone to get involved with this to create the ultimate alias list

Thanks digit!
VSIDO      VSIDO Change Blog    

    I dev VSIDO

VastOne

#2
I am going to have plait as a default app in VSIDO on the next build, so if there are plait aliases ...

Which raises the next point.  If there are aliases people use for non existent apps in VSIDO, we can certainly still use them so please include any that make sense
VSIDO      VSIDO Change Blog    

    I dev VSIDO

statmonkey

Great to hear plait will be included!  As I mentioned in the plait thread I use scripts for the most part.  I have significantly reworked my original simple script and am refining it.  I'll post it in the plait script for any who are interested.  I do have some more aliases that are app specific which I will throw out like:
# This assumes you have defined a printer as LPDEST!!!!
alias print='/usr/bin/lp -o nobanner -d $LPDEST'
# Assumes LPDEST is defined (default printer)
alias qpr='enscript -h -G -fCourier9 -d $LPDEST'
# Pretty-print using enscript

which allows me to make scripts that print the results out to my printer for debugging and various other niceties.

Digit

#4
i forsee much cunning ls aliases coming soon
(just posting that to remind me to add my latest, biggest, forrest and others ~ when i'm not in such a manic tizzy)


[edit]
i knew i'd get back to this... but... i could have swore i had more funky ls aliases...  oh well... making an ls section for it, and adding these:
alias big='ls -laSh | head'
alias latest='ls -lhart'

alias running='PS_FORMAT="user,pid,pcpu,pmem,start,args" ps axf'

#cant see the forrest for the trees (install tree too, its nice)
alias forrest="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/   /' -e 's/-/|/'"

Digit

#5
thnx dizzie,
gotta add this:

alias listtermcolors='(x=`tput op` y=`printf %76s`;for i in {0..256};do o=00$i;echo -e ${o:${#o}-3:3} `tput setaf $i;tput setab $i`${y// /=}$x;done)'

thought i'd botch in an alias for this colour other graph thing too, but, not sure of the best one, er, this colour thing might actually deserve its own thread... 

http://vsido.org/index.php/topic,539.msg6326.html#msg6326

Digit

adding alias lxterm='lxterminal' thnx to extropy's suggestion