ssh -i keyfile.pem -L 8888:localhost:8888 ๊ณ„์ •@10.1.1.1

Oh My Zsh์„ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
Bash
Copy

์ž๋™์œผ๋กœ ์„ค์น˜๊ฐ€ ์ง„ํ–‰๋˜๊ณ , ๋งˆ์ง€๋ง‰์— zsh๋ฅผ ๊ธฐ๋ณธ ์‰˜๋กœ ์ง€์ •ํ•˜๊ธฐ ์œ„ํ•ด ํ˜„ ์‚ฌ์šฉ์ž ๊ณ„์ •์˜ ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.

๋ฐ”๋กœ ํ”Œ๋Ÿฌ๊ทธ์ธ 2๊ฐœ๋ฅผ ์„ค์น˜ํ•ด์ค๋‹ˆ๋‹ค.

# zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

# zsh-autosuggestions
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
Bash
Copy

ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์ ์šฉ์‹œํ‚ค๊ธฐ ์œ„ํ•ด .zshrc๋ฅผ ์ˆ˜์ •ํ•ฉ๋‹ˆ๋‹ค. ์•„๋ž˜์ฒ˜๋Ÿผ plugins=( ) ์— zsh-... ๋‘ ์ค„์„ ์ถ”๊ฐ€ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.

vi ~/.zshrc
Bash
Copy
...

# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
  git
  zsh-syntax-highlighting
  zsh-autosuggestions
)

...
Bash
Copy
source ~/.zshrc
Bash
Copy

๋‹ค ์„ค์น˜๋์–ด์š”. ๊ฐ„๋‹จํ•œ ์˜ˆ์‹œ ์Šคํฌ๋ฆฐ์ƒท์„ ๋ณด์—ฌ๋“œ๋ฆด๊ฒŒ์š”.

์•„๋ž˜ ์Šคํฌ๋ฆฐ์ƒท์€ ์—†๋Š” ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ• ๋•Œ์™€ ๋ช…๋ น์–ด ์ž๋™ ์™„์„ฑ ์˜ˆ์‹œ์ž…๋‹ˆ๋‹ค. ๋ณด์‹œ๋ฉด ๋ฐ”๋กœ ์ดํ•ด๊ฐ€ ๋  ๊ฑฐ์˜ˆ์š”.

์ŠคํŽ ๋ง ๊ฒ€์‚ฌ ๊ธฐ๋Šฅ์„ ์ผ  ๋’ค ํ…Œ์ŠคํŠธํ•ด๋ดค์Šต๋‹ˆ๋‹ค.

๊ทธ๋ฆฌ๊ณ  git repository ๋””๋ ‰ํ† ๋ฆฌ๋กœ ์ด๋™ํ–ˆ์„ ๋•Œ ์ž…๋‹ˆ๋‹ค.


ํŠน์ • ์†Œ์Šค์—์„œ ํ•œ๊ธ€์ด ๋“ค์–ด์žˆ๋Š” ํŒŒ์ผ ํ˜น์€ ๋ผ์ธ์„ ์ถœ๋ ฅํ•˜๋ ค๋ฉด
์ •๊ทœ์‹์„ ์‚ฌ์šฉํ•˜๋Š”๋ฐ

".*[๊ฐ€-ํžฃ]+.*" ์™€ ๊ฐ™์ด ์ฃผ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

์ฃผ์˜: OS X ํ„ฐ๋ฏธ๋„์—์„œ๋Š” UTF-8-MAC ์ด๋ผ ๋™์ผํ•œ ๊ฒฐ๊ณผ๊ฐ€ ์•ˆ ๋‚˜์˜ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋‹ค์Œ์€, ํŒŒ์ด์ฌ ์†Œ์ŠคํŒŒ์ผ์—์„œ ํ•œ์ž ์ด์ƒ์˜ ํ•œ๊ธ€ ๋ฌธ์ž์—ด์ด ๋“ค์–ด ์žˆ๋Š” ๊ฒƒ์„
๋ชจ๋‘ ์ถœ๋ ฅํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.

$ find . -name "*.py" -print0 | xargs -0 egrep ".*[๊ฐ€-ํžฃ]+.*"
...

$ find . -name "*.py" -print0 | xargs -0 egrep -l ".*[๊ฐ€-ํžฃ]+.*"
...

์œ„์™€ ๊ฐ™์ด egrep -l ์˜ต์…˜์„ ์ฃผ๋ฉด ํŒŒ์ผ ์ด๋ฆ„๋งŒ ์ถœ๋ ฅํ•ฉ๋‹ˆ๋‹ค.

๋˜ํ•œ java ์†Œ์Šค ํŒŒ์ผ ์ค‘์—์„œ ํ•ด๋‹น ํ•œ๊ธ€์ด ๋“ค์–ด๊ฐ€ ์žˆ๋Š” ๊ฒƒ์„ ์ฐพ์œผ๋ ค๋ฉด

$ find . -name "*.java" -print0 | xargs -0 egrep -l ".*[๊ฐ€-ํžฃ]+.*"
...

์™€ ๊ฐ™์ด ํ•ฉ๋‹ˆ๋‹ค.


+ Recent posts