AutoYADM commit: 2025-07-19 00:08:39
This commit is contained in:
parent
a9ba741e32
commit
1d9a2fcf78
1 changed files with 8 additions and 3 deletions
|
@ -12,9 +12,14 @@ provide-module local-kakrc %—
|
|||
# ensures that the file exists
|
||||
define-command -hidden local-kakrc-ensure-file %{
|
||||
nop %sh{
|
||||
if [ ! -f "$kak_opt_local_kakrc_trusted" ]; then
|
||||
mkdir -p "$kak_opt_local_kakrc_trusted"
|
||||
touch "$kak_opt_local_kakrc_trusted"
|
||||
file="$kak_opt_local_kakrc_trusted"
|
||||
dir="$(dirname "$file")"
|
||||
if [ ! -f "$file" ]; then
|
||||
[ ! -d "$dir" ] || mkdir -p "$dir"
|
||||
base="$(basename "$file")"
|
||||
# add to gitignore by default
|
||||
printf '%s\n' "$base" >>"$dir/.gitignore"
|
||||
touch "$file"
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue