After gemini-propoesed fixes
This commit is contained in:
parent
2e31283b61
commit
83324dd0f7
11 changed files with 228 additions and 307 deletions
13
editx
13
editx
|
|
@ -16,15 +16,12 @@ then
|
|||
ched "EDITOR env variable not set! You will have to set it yourself in the next screen."
|
||||
fi
|
||||
|
||||
exists=$(file "$1" >/dev/null && echo $?)
|
||||
[[ -e "$1" ]] && existed=1 || existed=0
|
||||
|
||||
touch "$1"
|
||||
chmod +x "$1"
|
||||
$EDITOR "$1"
|
||||
wait $!
|
||||
size=$(du "$1" | cut -f 1)
|
||||
chmod +x "$1"
|
||||
daisy_editor "$1"
|
||||
|
||||
if [[ $size -eq 0 && $exists -ne 0 ]];
|
||||
then
|
||||
rm -rf "$1"
|
||||
if [[ ! -s "$1" && $existed -eq 0 ]]; then
|
||||
rm -f "$1"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue