zoukankan      html  css  js  c++  java
  • make CLI Comfortable When Working in Multiple Directoies

    alias

    alias is command-line counterpart of hotstring of AutoHotkey, for example:

    alias vboat='vi ~/docs/erlang/boat.erl'
    
    alias toerl='cd ~/docs/erlang'
    

    If hope for later use, save them in ~/.bash_aliases(if it's spacified in .bashrc), otherwise, ~/.bashrc.

    CDPATH

    $CDPATH to command "cd" is the same with $PATH with executables, or $CLASSPATH to command "java". For example:

    bvt@pwm:~/docs/test/workspace$ CDPATH=/usr/share/ant 
    bvt@pwm:~/docs/test/workspace$ cd lib 
    /usr/share/ant/lib 
    bvt@pwm:/usr/share/ant/lib$
    

    Save the value of CDPATH in .bashrc for later use.

    Bookmarks of vim NerdTree

    See note " Notes about NERDTree ";

    Temporary directories switching

    pushd <dir_name>: add to path stack and switch to it. For example pushd . add current path to path stack;

    Switch between two directories

    pushd: swap top and second item in stack and switch to second path;

    cd -: "-" is $OLDPWD;

    Switch between multiple directories

    pushd +n or pushd -n (n is a 1,2,...): rotates the stack and change to the n-th path in stack, n is decided by dirs -v command;

    dirs & popd

    dirs -v: print the path stack;

    See Linux / Unix Command: pushd.

  • 相关阅读:
    PHP如何获取内网IP
    开源的世界并不纯净
    在linux下玩上了第一人称射击
    终于,在linux下上网了
    我的理想
    vista是什么
    我傻了一阵子
    又是大端小端!!!
    谈谈最近的编程状态
    如何快速发布你的C++Builder程序
  • 原文地址:https://www.cnblogs.com/darkmatter/p/3606781.html
Copyright © 2011-2022 走看看