u16suzuの blog

日々学んだことのメモブログです。

cのソースをビルド&runする fish shell のコマンド

function gcc_build -d "cのソースをビルド&runする"
  set c_file $argv
  set o_file (string replace ".c" ".o" $c_file)

  gcc $c_file -o $o_file
  eval ./$o_file
end