Update configs
Fix call to $EDITOR (and switch sh to bash) in edit Fix waybar mode (remove to fix layer) Add hyprland media keys
This commit is contained in:
parent
717d35f2b0
commit
9344f7ec3b
5 changed files with 12 additions and 13 deletions
.bin
14
.bin/edit
14
.bin/edit
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
|
@ -69,19 +69,13 @@ _prepare_for_edit() {
|
|||
_pre_checks
|
||||
|
||||
# Prepare all files for editing and collect the names of the edit files
|
||||
all_edit_files=""
|
||||
all_edit_files=()
|
||||
for arg in "$@"; do
|
||||
edit_file=$(_prepare_for_edit "$arg")
|
||||
all_edit_files="$all_edit_files $edit_file"
|
||||
all_edit_files+=("$edit_file")
|
||||
done
|
||||
|
||||
# Use a subshell to avoid overwriting $@
|
||||
(
|
||||
for file in $all_edit_files; do
|
||||
set -- "$file" "$@"
|
||||
done
|
||||
$EDITOR "$@"
|
||||
)
|
||||
$EDITOR "${all_edit_files[@]}"
|
||||
|
||||
# Copy all edit files back
|
||||
for arg in "$@"; do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue