Update
This commit is contained in:
parent
a10107f4ff
commit
e8df6aa245
|
@ -156,13 +156,13 @@ _getConfEditor() {
|
||||||
_reloadModule
|
_reloadModule
|
||||||
break;;
|
break;;
|
||||||
COPY)
|
COPY)
|
||||||
echo "Define the new file name. Please use [a-zA-Z1-9_-]+.conf"
|
echo "Define the new file name. Please use *.conf"
|
||||||
filename=$(gum input --value="custom-${sel##*/}" --placeholder "Enter your filename")
|
filename=$(gum input --value="custom-${sel##*/}" --placeholder "Enter your filename")
|
||||||
if [ -z $filename ] ;then
|
if [ -z $filename ] ;then
|
||||||
echo "ERROR: No filename specified."
|
echo "ERROR: No filename specified."
|
||||||
else
|
else
|
||||||
if ! [[ $filename =~ ^[a-zA-Z1-9_-]+.conf ]]; then
|
if ! [[ $filename =~ [^\s]+.conf ]]; then
|
||||||
echo "ERROR: Wrong filename format. Please use [a-zA-Z1-9_-]+.conf"
|
echo "ERROR: Wrong filename format. Please use *.conf"
|
||||||
else
|
else
|
||||||
if [ -f $(dirname $sel)/$filename ] ;then
|
if [ -f $(dirname $sel)/$filename ] ;then
|
||||||
echo "ERROR: File already exists."
|
echo "ERROR: File already exists."
|
||||||
|
|
Loading…
Reference in New Issue
Block a user