Autojump: Homebrew๋กœ ์„ค์น˜ํ•œ ํ›„ macOS์—์„œ ์ด ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜๋ ค๋ฉด ๋ฌด์—‡์„ ์†Œ์‹ฑํ•ด์•ผ ํ•ฉ๋‹ˆ๊นŒ?

์— ๋งŒ๋“  2017๋…„ 11์›” 27์ผ  ยท  13์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: wting/autojump

์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

ํ•ญ์ƒ ๋‹ค์Œ ๋ฉ”์‹œ์ง€๋ฅผ ๋ฐ›์Šต๋‹ˆ๋‹ค.

Please source the correct autojump file in your shell's
startup file. For more information, please reinstall autojump
and read the post installation instructions.

๋„์›€์„ ์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

๋ช…๋ น์„ ์‚ฌ์šฉํ•˜์—ฌ ์ฃผ์˜ ์‚ฌํ•ญ์„ ๋‹ค์‹œ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

brew info autojump

๊ทธ๋ฆฌ๊ณ  ๊ทธ๊ฒƒ์€ ๋‹น์‹ ์—๊ฒŒ ์ถœ๋ ฅ์„ ์ค„ ๊ฒƒ์ž…๋‹ˆ๋‹ค

autojump: stable 22.5.1 (bottled), HEAD
Shell extension to jump to frequently used directories
https://github.com/wting/autojump
/usr/local/Cellar/autojump/22.5.1 (24 files, 253.9KB) *
  Poured from bottle on 2017-11-28 at 13:37:16
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/autojump.rb
==> Caveats
Add the following line to your ~/.bash_profile or ~/.zshrc file (and remember
to source the file to update your current session):
  [ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh

If you use the Fish shell then add the following line to your ~/.config/fish/config.fish:
  [ -f /usr/local/share/autojump/autojump.fish ]; and source /usr/local/share/autojump/autojump.fish

zsh completions have been installed to:
  /usr/local/share/zsh/site-functions

๋ชจ๋“  13 ๋Œ“๊ธ€

"์„ค์น˜ ํ›„ ์ง€์นจ์„ ์ฝ์œผ์‹ญ์‹œ์˜ค"๋ผ๋Š” ๋ถ€๋ถ„์„ ์‹œ๋„ ํ–ˆ์Šต๋‹ˆ๊นŒ?

https://github.com/wting/autojump#installation

๋‚˜๋Š” ๊ฐ€์ง€๊ณ ์žˆ๋‹ค. macOS์˜ ๊ฒฝ์šฐ brew install ๋ผ๊ณ ๋งŒ ๋งํ•˜๊ณ  ๊ทธ๊ฒŒ ์ „๋ถ€์ž…๋‹ˆ๋‹ค.

brew install์€ ์„ค์น˜ ํ›„ ์ง€์นจ์„ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค. ๊ฑฐ๊ธฐ์—๋Š” ์ด์œ ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

https://github.com/Homebrew/homebrew-core/blob/b6b9f36c8744c2259b74f12850163c676ae49396/Formula/autojump.rb#L27 -L35

๋ช…๋ น์„ ์‚ฌ์šฉํ•˜์—ฌ ์ฃผ์˜ ์‚ฌํ•ญ์„ ๋‹ค์‹œ ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

brew info autojump

๊ทธ๋ฆฌ๊ณ  ๊ทธ๊ฒƒ์€ ๋‹น์‹ ์—๊ฒŒ ์ถœ๋ ฅ์„ ์ค„ ๊ฒƒ์ž…๋‹ˆ๋‹ค

autojump: stable 22.5.1 (bottled), HEAD
Shell extension to jump to frequently used directories
https://github.com/wting/autojump
/usr/local/Cellar/autojump/22.5.1 (24 files, 253.9KB) *
  Poured from bottle on 2017-11-28 at 13:37:16
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/autojump.rb
==> Caveats
Add the following line to your ~/.bash_profile or ~/.zshrc file (and remember
to source the file to update your current session):
  [ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh

If you use the Fish shell then add the following line to your ~/.config/fish/config.fish:
  [ -f /usr/local/share/autojump/autojump.fish ]; and source /usr/local/share/autojump/autojump.fish

zsh completions have been installed to:
  /usr/local/share/zsh/site-functions

[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh ์ถ”๊ฐ€ํ•˜๊ณ  ํŒŒ์ผ์„ ์†Œ์‹ฑํ•œ ํ›„์—๋„ ์—ฌ์ „ํžˆ ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

j <dirname> ํ•˜๊ณ  ๋””๋ ‰ํ† ๋ฆฌ๋ฅผ ๋ณ€๊ฒฝํ•˜๋Š” ๋Œ€์‹  ํ˜„์žฌ ๋””๋ ‰ํ† ๋ฆฌ์— ๋‚จ์Šต๋‹ˆ๋‹ค.

๋‹ค์Œ ๋ฒˆ์— j <dirname> ๋ฅผ ํ˜ธ์ถœํ•  ๋•Œ autojump๊ฐ€ ๊ธฐ์–ตํ•ด ๋‘๊ธฐ๋ณด๋‹ค ๋จผ์ € cd <dirname> ๋ฅผ ์ž…๋ ฅํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

์•„, ์ด๋Ÿฐ, ๋‚ด๊ฐ€ ๋ชฉ์ ์„ ์ž˜๋ชป ์ดํ•ดํ–ˆ์œผ๋ฏ€๋กœ ์ž๋™ ์ ํ”„๋Š” ํ˜„์žฌ ์œ„์น˜์—์„œ ๊นŠ์ด ์ค‘์ฒฉ๋œ ํ•˜์œ„ ๋””๋ ‰ํ† ๋ฆฌ๋ฅผ ์ฐพ๋Š” ๊ฒƒ๋ณด๋‹ค ๋นจ๋ฆฌ ๋Œ์•„๊ฐˆ ์ˆ˜ ์žˆ๋„๋ก ํ˜„์žฌ ์œ„์น˜๋ฅผ ๊ธฐ์–ตํ•˜๋Š” ๊ฒƒ์— ๋” ๊ฐ€๊น์Šต๋‹ˆ๋‹ค.

์˜ˆ, README.md์—์„œ ์ธ์šฉํ•œ ๋Œ€๋กœ

๋ช…๋ น์ค„์—์„œ ๊ฐ€์žฅ ๋งŽ์ด ์‚ฌ์šฉํ•˜๋Š” ๋””๋ ‰ํ„ฐ๋ฆฌ์˜ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋ฅผ ์œ ์ง€ ๊ด€๋ฆฌํ•˜์—ฌ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

_๋””๋ ‰ํ† ๋ฆฌ๋Š” ์ ํ”„ํ•˜๊ธฐ ์ „์— ๋จผ์ € ๋ฐฉ๋ฌธํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค._

๋‚˜๋Š” ๋˜ํ•œ์ด ๋ฌธ์ œ์— ์ง๋ฉด ํ•ด์žˆ๋‹ค.
Homebrew๋ฅผ ํ†ตํ•ด ์„ค์น˜ํ•œ ํ›„ ์ด๊ฒƒ์„ .bash_profile์— ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh
๋‚˜๋Š” ๋˜ํ•œ ๋‹ค์Œ์„ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ;} history -a"

๋ช‡ ๊ฐœ์˜ ๋””๋ ‰ํ† ๋ฆฌ๋กœ cdํ•˜๋ฉด j -s ํ•ญ๋ชฉ์ด ์—†์Šต๋‹ˆ๋‹ค. ํ˜„์žฌ ์„ธ์…˜์—์„œ .bash_profile ๋ผ์ธ์„ ์ˆ˜๋™์œผ๋กœ ์‹คํ–‰ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ด๊ฒƒ์€ ์–ด๋–ป๊ฒŒ ๋“  ๋‚ด .bash_profile์˜ ๊ตฌ์„ฑ ๋ฌธ์ œ์ž…๋‹ˆ๊นŒ?

@helenes-r7๊ณผ ๋™์ผํ•œ ๋ฌธ์ œ๊ฐ€ ์žˆ์Œ

Homebrew๋ฅผ ํ†ตํ•ด ์„ค์น˜ํ•œ ํ›„ ์ด๊ฒƒ์„ .bash_profile์— ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh

๋ช‡ ๊ฐœ์˜ ๋””๋ ‰ํ† ๋ฆฌ๋กœ cdํ•˜๋ฉด j -s์— ํ•ญ๋ชฉ์ด ์—†์Šต๋‹ˆ๋‹ค.

์˜ˆ, ์„ธ์…˜์„ ๋‹ค์‹œ ๋กœ๋“œํ•˜๊ธฐ ์œ„ํ•ด source ~/.bash_profile ๋ฅผ ์ˆ˜ํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค.

@helenes-r7 @l-gothberg ์—ฌ๊ธฐ์—์„œ ์งˆ๋ฌธ์— ๋Œ€ํ•ด ์ฝ์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. https://apple.stackexchange.com/questions/12993/why-doesnt-bashrc-run-automatically

์ฐธ์—ฌํ•ด ์ฃผ์‹  @bendem ๊ณผ @aphe ์—๊ฒŒ ๊ฐ์‚ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค.

Autojump๋Š” ๋ชจ๋“  ์‚ฌ์šฉ์ž๊ฐ€ ๋‹ค๋ฅธ ์‰˜๊ณผ ์ž ์žฌ์ ์œผ๋กœ ์‚ฌ์šฉ์ž ์ •์˜๋œ ์„ค์ •์„ ์‚ฌ์šฉํ•˜๊ณ  ์ผ๋ถ€ ํŒจํ‚ค์ง€ ๋ฐฐํฌํŒ์€ ์‚ฌํ›„ ์„ค์น˜ ๊ตฌ์„ฑ(์˜ˆ: Debian)์„ ํ—ˆ์šฉํ•˜์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— ์„ค์น˜ ํ›„ ์„ค์ •์ด ํ•„์š”ํ•˜๋‹ค๋Š” ์ ์—์„œ ๊ณ ์œ ํ•ฉ๋‹ˆ๋‹ค.

#323์˜ ์„ค์น˜ ํ›„ ๋‹จ๊ณ„๋ฅผ ๊ฐœ์„ ํ•  ๊ณ„ํš์ด๋ฏ€๋กœ ํ”ผ๋“œ๋ฐฑ์„ ๊ทธ๊ณณ์œผ๋กœ ๋ฆฌ๋””๋ ‰์…˜ํ•˜์‹ญ์‹œ์˜ค.

์ฝ์–ด๋ณด๊ธฐ์— ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋‚ด์šฉ์ด ์žˆ์œผ๋ฉด ์ข‹์Šต๋‹ˆ๋‹ค.

[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh

์„ค์น˜ ํ›„ ์ง€์นจ์„ ์ฝ์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค(์ฃ„์†กํ•ฉ๋‹ˆ๋‹ค!). ๊ทธ๋ƒฅ ๊ธฐ๋ณธ์ ์œผ๋กœ ์ž‘๋™ํ•  ๊ฒƒ์ด๋ผ๊ณ  ๊ฐ€์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.
"์„ค์น˜ ํ›„ ์ง€์นจ ์ฝ๊ธฐ" ์˜†์—/๋Œ€์‹ ์— ์ถ”๊ฐ€ํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰