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
์ ์ถ๊ฐ๊ฐ ๋์๋ค. ๋.









