Compare commits

...
7 Commits
Author SHA1 Message Date
romanzy313 445110f8ba Merge branch 'main' of ssh://ssh.devstuff.volovoy.com:2222/romanzy313/dotfiles 2026-11-22 19:57:22 +01:00
romanzy313 407e1e40d7 pycheck commands 2026-11-21 12:58:20 +01:00
romanzy313 82e363e2db major refactor 2026-11-20 21:21:54 +01:00
romanzy313 65228858bf no more interactive terminal 2026-11-20 21:19:52 +01:00
romanzy313 17e4e8974e better emacs alias 2026-11-20 21:18:08 +01:00
romanzy313 5c83cea036 aliases improved 2026-11-20 21:11:25 +01:00
romanzy313 b973d61038 deC emacs 2026-11-20 21:02:30 +01:00
2 changed files with 15 additions and 26 deletions
+3 -25
View File
@@ -1,32 +1,10 @@
cc-clean(){
rm -rf ./**/*.out 2>/dev/null
}
# compile and run a single C program. Useful for prototyping.
cc-run(){
local file
if [ -z "$1" ]; then
echo "Usage: cc-run <file> [args...]" >&2
return 1
fi
file="$1"
shift
gcc "${file}" -o "${file}.out" -Wall -Wextra -Werror -g3 -fsanitize=address $@ && \
"./${file}.out"
rm "${file}.out"
}
# https://pypi.org/project/c-formatter-42/
# install via
# pip3 install --user c-formatter-42
norm(){
normify(){
c_formatter_42 *.c *.h
}
pcheck(){
flake8 . && echo "flake good"
mypy --strict .
pycheck(){
flake8 --color=never . && echo "Success: flake8" && mypy --strict .
}
+12 -1
View File
@@ -2,7 +2,11 @@
(setenv "SHELL" "/bin/bash")
(setq shell-file-name "/bin/bash"
explicit-shell-file-name "/bin/bash"
shell-command-switch "-ic")
shell-command-switch "-c")
;; Start the compile prompt with an empty command.
(setq-default compile-command "")
;; Disable auto-save files (#file#).
(setq auto-save-default nil)
@@ -42,3 +46,10 @@
;; Enable the theme without a confirmation prompt.
(load-theme 'gruber-darker t)
;; Python
(defun pycheck ()
"Run flake8 and mypy in the current directory."
(interactive)
(compile "flake8 --color=never . && echo 'Success: flake8' && mypy --strict ."))