lMicROl said:What you use alias? It will be possible interestingly not only me :stud
I use:
Code:alias mic make install clean alias mrc make reinstall clean alias mdc make deinstall clean alias pfu portsnap fetch update alias wtf man
alias pkg_radd 'pkg_add -r'
alias ping 'ping -c4'
alias cls 'clear'
alias FTP 'ftp -a'
alias del 'rm -r'
alias glg="git log"
alias gsh="git show"
alias gci="git commit -a"
alias gsv="git commit -a -m 'save'"
alias gco="git checkout"
alias gps="git push"
alias gpl="git pull"
alias gad="git add"
alias gst="git status"
alias gas="git stash"
alias gdf="git diff"
alias gbr="git branch"
alias gsup="git svn rebase"
alias gsci="git svn dcommit"
alias rs="screen -d -r"
alias yim="yi --as=vim"
alias pub="cd $REPOS_PATH/pub"
alias own="cd $REPOS_PATH/own"
# unrelated but I also like my prompt to be user[currentdir]#
set prompt = "%n[%C05]# "
# go to given port directory, e.g. gotoport mplayer = cd /usr/ports/multimedia/mplayer
alias gotoport 'cd `whereis -sq \!*`'
# cat out the description file of the given port
alias portdescr 'cat `whereis -sq \!*`/pkg-descr'
# list outdated ports
alias oldports pkg_version -IvL '='
alias la='ls -abFG'
alias lc='ls -bCG'
alias ll='ls -abhlG'
alias lr='ls -bRG'
alias e="vim"
alias y="/usr/local/bin/e" # simple expression evaluator
alias cclive='cclive -f best -F "%t.%s"'
Works for (t)csh: [cmd=]set correct = command[/cmd]jalla said:My three most useful aliases
Code:alias mroe more alias mkea make alias mkae make
And a convenient shortcut for adding other frequent typo's
alias cdburn "mkisofs -o cd.iso -r \!*;\
sudo burncd -f /dev/acd0 data cd.iso fixate; rm cd.iso"
alias devl "sudo camcontrol devlist"
alias mcd "sudo mount -r -t cd9660 /dev/acd0 /mnt; cd /mnt; ls"
alias mfl "sudo mount_msdosfs -u sverreh /dev/da0 /a; cd /a; ls"
alias msk "cd /usr/ports; make search key=\!* display=name,path,info\
keylim=1|less; cd -"
alias msn "cd /usr/ports; make search name=\!* display=name,path,info\
keylim=1|less; cd -"
alias po "popd -v \!*"
alias pu "pushd -v \!*"
alias xpdf "xpdf -g 1000x1000+140+0 -papercolor cornsilk -mattecolor steelblue\
-z 175 -level1 \!*"
alias xt "xterm -sb -sl 9999 -cc 33:48,36-37:48,43:48,45-47:48,64:48\
-geometry 80x25+100+100 -cr red -bg \!:1 -fg \!:2 -fn 7x13&"
#.csh rc - default aliases snipped
alias lm 'ls -F | more'
# cd to the directory 'port', usage: cdport 'port'
# make sure to use backquotes around whereis
alias cdport 'cd `whereis -sq \!*`'
# cat out the pkg-descr file of given port
# portdescr 'port'
alias portdescr 'cat `whereis -sq \!*`/pkg-descr'
alias portplist 'cat `whereis -sq \!*`/pkg-plist | more'
alias oldports pkg_version -IvL '='
ikbendeman said:Code:# cd to the directory 'port', usage: cdport 'port' # make sure to use backquotes around whereis alias cdport 'cd `whereis -sq \!*`'
alias src source $HOME/bin/cdsrc
#!/bin/csh
set d = `whereis -sq $1`
if ( "X$d" == "X" ) then
echo "No source directory found for $1"
else
cd $d
endif
alias q exit
alias cls clear
alias sysoff 'shutdown -p now'
alias diskstat 'df -achT'
alias ver 'echo "`uname` `uname -r`"'
alias dir 'ls -ahlFGT'
alias del rm
alias copy cp
alias md mkdir
alias rd rmdir
if ( `whereis -bq mc` != "" ) then
alias edit 'mc -e'
alias view 'mc -v'
else
alias edit ee
alias view 'less -M -Q -J -~'
endif
I always thought the usefulness of aliases lies in having less typing than with the original command.Erratus said:Code:alias helpcommand info #place cursor over command and do alt-h
May be you didn't get how and when to use it? Did you try?Beastie said:I always thought the usefulness of aliases lies in having less typing than with the original command.