mirror of
https://github.com/Cian-H/dotfiles.git
synced 2026-04-19 07:25:46 +01:00
Changed . token to _dot
This change allows the dotfiles to work with chezmoi (e.g: on windows) and improves grepability with neovim/telescope
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
# Runs C code via GCC without leaving a file behind
|
||||
def rcc [
|
||||
file: path # The file to run
|
||||
] {
|
||||
# Remove exe if still exists
|
||||
rm $"($file).exe" --permanent --force
|
||||
# Compile code to exe
|
||||
^gcc ("." | path join $file | path expand) -o ("." | path join $"($file).exe" | path expand)
|
||||
# Execute exe
|
||||
^$"($file).exe"
|
||||
# Remove exe
|
||||
rm $"($file).exe" --permanent --force
|
||||
}
|
||||
|
||||
# Runs C++ code via g++ without leaving a file behind
|
||||
def r++ [
|
||||
file: path # The file to run
|
||||
] {
|
||||
# Remove exe if still exists
|
||||
rm $"($file).exe" --permanent --force
|
||||
# Compile code to exe
|
||||
^g++ ("." | path join $file | path expand) -o ("." | path join $"($file).exe" | path expand)
|
||||
# Execute exe
|
||||
^$"($file).exe"
|
||||
# Remove exe
|
||||
rm $"($file).exe" --permanent --force
|
||||
}
|
||||
Reference in New Issue
Block a user