• 请不要在回答技术问题时复制粘贴 AI 生成的内容
alexapollo
V2EX  ›  程序员

交流点有用的 shell alias

  •  
  •   alexapollo ·
    geekan · Dec 26, 2014 · 4783 views
    This topic created in 4339 days ago, the information mentioned may be changed or developed.

    我先来:
    pin='pip install -i http://pypi.douban.com/simple'
    cd..='cd ..'
    cd...='cd ../..'
    cd....='cd ../../..'
    cd.....='cd ../../../..'
    gp='git push'
    gup='git pull --rebase'
    f='find . | grep --color'
    g='find . | xargs grep --color -n'
    m='make -j 8'

    20 replies  •  2014-12-27 10:36:34 +08:00
    rick09
    rick09
    Dec 26, 2014
    1
    怎么可以少了 rm='rm -i'
    Tink
    Tink
    Dec 26, 2014❤️4
    2
    rm = rm -rf /
    ChiangDi
    ChiangDi
    Dec 26, 2014
    3
    alias ... "cd ../../"
    alias .... "cd ../../../"
    alias ..... "cd ../../../../"
    alias rm "rm -i"
    alias cp "cp -i"
    alias mv "mv -i"
    alias s "subl"
    alias mux "tmuxinator"
    alias sl "ls"

    # git alias
    alias g "git"
    alias ga "git add"
    alias gc "git commit -v"
    alias gc! "git commit -v --amend"
    alias gp "git push"
    alias gcm "git checkout master"
    alias gst "git status"
    LazyZhu
    LazyZhu
    Dec 26, 2014
    4
    cd 为啥还是两个点?
    推荐bash的pushd/popd,切换目录更方便
    viator42
    viator42
    Dec 26, 2014❤️1
    5
    ll = ls -al
    没有这个简直没法过.
    xzl380
    xzl380
    Dec 26, 2014❤️1
    6
    ffffwh
    ffffwh
    Dec 26, 2014
    7
    alias emcas=emacs
    alias eamcs=emacs
    。。。
    vibbow
    vibbow
    Dec 26, 2014
    8
    alias cls=clear
    vibbow
    vibbow
    Dec 26, 2014
    9
    alias dir=ls -alt
    XiaoxiaoPu
    XiaoxiaoPu
    Dec 26, 2014
    10
    alias r='echo -ne "\033c"'
    bingdian
    bingdian
    Dec 26, 2014❤️2
    11
    alias server="open http://localhost:8000 && python -m SimpleHTTPServer "

    顺便再分享个 http://dotfiles.github.io/
    iptux
    iptux
    Dec 26, 2014
    12
    razrlele
    razrlele
    Dec 26, 2014
    13
    alias emacs="vim"
    veapon
    veapon
    Dec 26, 2014
    14
    saber000
    saber000
    Dec 27, 2014
    16
    alias clr='printf "\ec"'
    47jm9ozp
    47jm9ozp
    Dec 27, 2014
    17
    .gitconfig里面

    [alias]
    lg = log --all --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
    R4rvZ6agNVWr56V0
    R4rvZ6agNVWr56V0
    Dec 27, 2014
    18
    alias site="curl -s -o /dev/null -w '%{http_code}'"
    zhujinliang
    zhujinliang
    Dec 27, 2014
    19
    gohere="export GOPATH=`pwd`"
    reverland
    reverland
    Dec 27, 2014
    20
    ~  type rot13
    rot13 is an alias for tr '[A-Za-z]' '[N-ZA-Mn-za-m]'


    ~  type rot13r
    rot13r is an alias for tr '[N-ZA-Mn-za-m]' '[A-Za-z]'
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1153 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 52ms · UTC 18:05 · PVG 02:05 · LAX 10:05 · JFK 13:05
    ♥ Do have faith in what you're doing.