Big update
This commit is contained in:
parent
17dc67816a
commit
4be1762868
17 changed files with 1238 additions and 1338 deletions
19
bin/quickrun.fish
Executable file
19
bin/quickrun.fish
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i fish
|
||||
#!nix-shell -p fish gcc
|
||||
|
||||
|
||||
set file (realpath $argv[1])
|
||||
|
||||
set workdir (mktemp -d)
|
||||
cd $workdir
|
||||
|
||||
set extension (string match -r '\.([a-z]+)$' $file | head -n 1)
|
||||
|
||||
switch $extension
|
||||
case ".c"
|
||||
gcc -o a.out $file
|
||||
./a.out
|
||||
case ".py"
|
||||
python $file
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue