Linux学习——定义命令行函数(cd .. -> ..)

  在使用shell的时候,每天要面对各种命令行,比如ls , cd .. 等

抱着简单,可依赖的思想。有些可以简化的操作可以要通过在 ~/.bashrc 中进行添加:

1. cd .. -> ..

alias ..="cd .."

2. cd  -> cd ls

function cd() { builtin cd ${1:-$HOME} && ls; }
原文地址:https://www.cnblogs.com/chenhuan001/p/6829490.html