Perl smartcd
perlμ μ¬μ©ν΄ κ°λ°μ ν λ μ΄λ°μ λ° μ΄μ λ‘ PATH νκ²½λ³μλ₯Ό λ³κ²½ ν΄μΌν λκ° λ§λ€...
λ§€λ² eval ν νμ μμ΄ λλ ν 리 μ΄λν λ λ§λ€ μλμΌλ‘ bashλ‘ λ³κ²½ν μ μκ² νλκ²μ΄ smartcd.
https://github.com/cxreg/smartcd
μνλκ³³μ ν΄λ‘ μ λ°λλ€.
$ git clone https://github.com/cxreg/smartcd
μ€μΉλ₯Ό νλ€.
$ make install $ source load_smartcd $ smartcd config
μ€μΉκ° μλ£λλ©΄ μ λ ₯ν ν΄λλ‘ μ΄λνλ€.
$ mkdir ~/test $ cd ~/test
smartcd λ₯Ό μ¬μ©νλ€.
$ echo 'eval $(perl -Mlocal::lib=~/test | sed '\''s/export/autostash/'\'')' | smartcd edit enter
νμΈμ νλ€.
$ cd .. $ cd ~/test
컀λ©λμ νμκ° λλ€.
smartcd: running /home/lars/.smartcd/scripts/home/user/test/bash_enter
κΆκΈνλκΉ νλ² λ νμΈν΄ λ³Έλ€. $ echo $PATH /home/user/test/bin :/usr/local/sbin :/usr/local/bin :/usr/sbin :/usr/bin :/sbin :/bin :/usr/games :/usr/local/games
μ μΆκ°κ° λμλ€. λ.












