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.

  • 相关阅读:
    阿里云中挖矿病毒
    flutter 返回刷新页面
    PM2 常用命令
    阿里云Redis 配置
    stm32f407启动文件分析
    C++类的前置声明
    Qt快速入门学习笔记(画图篇)
    Qt快速入门学习笔记(基础篇)
    Qt入门实例
    Qt编码设置
  • 原文地址:https://www.cnblogs.com/darkmatter/p/3606781.html
Copyright © 2011-2022 走看看