Compare commits
4 commits
dd5aa1db6f
...
cbf39027c5
Author | SHA1 | Date | |
---|---|---|---|
cbf39027c5 | |||
642be92684 | |||
f279879ce0 | |||
35a87cd7e0 |
4 changed files with 89 additions and 1 deletions
25
.code_preloader.yml
Normal file
25
.code_preloader.yml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
---
|
||||||
|
# Example configuration for Code-Preloader
|
||||||
|
|
||||||
|
# List of repository paths to preload
|
||||||
|
# source_list:
|
||||||
|
# - "path/to/repo1"
|
||||||
|
# - "path/to/repo2"
|
||||||
|
|
||||||
|
# List of patterns to ignore during preloading
|
||||||
|
ignore_list:
|
||||||
|
- ^\.git/.*
|
||||||
|
- ^lib.*
|
||||||
|
|
||||||
|
# Path to the output file (if null, output to STDOUT)
|
||||||
|
output_path: null
|
||||||
|
|
||||||
|
prompt:
|
||||||
|
# Optional: Path to a file containing the prompt header
|
||||||
|
header_path: null
|
||||||
|
|
||||||
|
# Optional: Path to a file containing the prompt footer
|
||||||
|
footer_path: null
|
||||||
|
|
||||||
|
# Optional: Path to a file container a jinja template to structure the prompt
|
||||||
|
template_path: null
|
|
@ -5,7 +5,7 @@ name: default
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build:binary
|
- name: build:binary
|
||||||
image: crystallang/crystal:1.10.1-alpine
|
image: crystallang/crystal:1.11.0-alpine
|
||||||
environment:
|
environment:
|
||||||
PACKAGE_BASENAME: mfm_linux_amd64
|
PACKAGE_BASENAME: mfm_linux_amd64
|
||||||
volumes:
|
volumes:
|
||||||
|
|
18
Makefile
18
Makefile
|
@ -3,11 +3,29 @@
|
||||||
# SPDX-FileCopyrightText: 2023 Glenn Y. Rolland <glenux@glenux.net>
|
# SPDX-FileCopyrightText: 2023 Glenn Y. Rolland <glenux@glenux.net>
|
||||||
# Copyright © 2023 Glenn Y. Rolland <glenux@glenux.net>
|
# Copyright © 2023 Glenn Y. Rolland <glenux@glenux.net>
|
||||||
|
|
||||||
|
PREFIX=/usr
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
|
prepare:
|
||||||
|
shards install
|
||||||
|
|
||||||
build:
|
build:
|
||||||
shards build --error-trace
|
shards build --error-trace
|
||||||
@echo SUCCESS
|
@echo SUCCESS
|
||||||
|
|
||||||
watch:
|
watch:
|
||||||
watchexec --restart --delay-run 3 -c -e cr make build
|
watchexec --restart --delay-run 3 -c -e cr make build
|
||||||
|
|
||||||
|
spec: test
|
||||||
|
test:
|
||||||
|
crystal spec --error-trace
|
||||||
|
|
||||||
|
install:
|
||||||
|
install \
|
||||||
|
-m 755 \
|
||||||
|
bin/code-preloader \
|
||||||
|
$(PREFIX)/bin
|
||||||
|
|
||||||
|
.PHONY: spec test build all prepare install
|
||||||
|
|
||||||
|
|
45
static/completion.bash
Normal file
45
static/completion.bash
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# mfm Bash completion script
|
||||||
|
|
||||||
|
_mfm() {
|
||||||
|
local cur prev opts
|
||||||
|
COMPREPLY=()
|
||||||
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||||
|
|
||||||
|
# Options globales pour 'mfm'
|
||||||
|
local mfm_global_opts="-c --config -v --verbose -o --open --version -h --help"
|
||||||
|
|
||||||
|
# Commandes pour 'mfm'
|
||||||
|
local mfm_cmds="config mapping completion"
|
||||||
|
|
||||||
|
# Options pour 'config' et 'mapping'
|
||||||
|
local config_opts="init"
|
||||||
|
local mapping_opts="list create edit mount umount delete"
|
||||||
|
|
||||||
|
# Ajouter les options globales à chaque cas
|
||||||
|
case "${prev}" in
|
||||||
|
mfm)
|
||||||
|
COMPREPLY=($(compgen -W "${mfm_cmds} ${mfm_global_opts}" -- ${cur}))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
config)
|
||||||
|
COMPREPLY=($(compgen -W "${config_opts} ${mfm_global_opts}" -- ${cur}))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
mapping)
|
||||||
|
COMPREPLY=($(compgen -W "${mapping_opts} ${mfm_global_opts}" -- ${cur}))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if [[ ${cur} == -* ]]; then
|
||||||
|
COMPREPLY=($(compgen -W "${mfm_global_opts}" -- ${cur}))
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# Appliquer la complétion à la fonction 'mfm'
|
||||||
|
complete -F _mfm mfm
|
Loading…
Reference in a new issue