3
วิธีการกำหนดฟังก์ชั่นทุบตีที่คล้ายกันในครั้งเดียว
ฉันมีฟังก์ชั่นเหล่านี้ใน~/.bashrc: function guard() { if [ -e 'Gemfile' ]; then bundle exec guard "$@" else command guard "$@" fi } function rspec() { if [ -e 'Gemfile' ]; then bundle exec rspec "$@" else command rspec "$@" fi } function rake() { if [ -e 'Gemfile' ]; then bundle exec …
10
bash