Why I can't change directories using “cd”?

后端 未结 30 2420
眼角桃花
眼角桃花 2020-11-21 06:17

I\'m trying to write a small script to change the current directory to my project directory:

#!/bin/bash
cd /home/tree/projects/java

I save

30条回答
  •  闹比i
    闹比i (楼主)
    2020-11-21 06:48

    I have a simple bash script called p to manage directory changing on
    github.com/godzilla/bash-stuff
    just put the script in your local bin directory (/usr/local/bin)
    and put

    alias p='. p'
    

    in your .bashrc

提交回复
热议问题