chore: --cat
for agenix-edit
This commit is contained in:
parent
29ad28b6f7
commit
472d6c61d1
1 changed files with 12 additions and 1 deletions
13
agenix-edit
13
agenix-edit
|
@ -9,6 +9,13 @@ else
|
||||||
is_unsafe=false
|
is_unsafe=false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$1" == "--cat" ]; then
|
||||||
|
is_cat=true
|
||||||
|
shift
|
||||||
|
else
|
||||||
|
is_cat=false
|
||||||
|
fi
|
||||||
|
|
||||||
name="$1"
|
name="$1"
|
||||||
script_dir=$(dirname "$(readlink -f "$0")")
|
script_dir=$(dirname "$(readlink -f "$0")")
|
||||||
|
|
||||||
|
@ -52,4 +59,8 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
agenix -e "$fullname" --identity "$private_path"
|
if [ "$is_cat" == "true" ]; then
|
||||||
|
export EDITOR=cat
|
||||||
|
fi
|
||||||
|
|
||||||
|
agenix -e "$fullname" --identity "$private_path"
|
||||||
|
|
Loading…
Reference in a new issue