summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xar/.local/bin/shortcuts8
1 files changed, 4 insertions, 4 deletions
diff --git a/ar/.local/bin/shortcuts b/ar/.local/bin/shortcuts
index 2f4c432..eaa9b5b 100755
--- a/ar/.local/bin/shortcuts
+++ b/ar/.local/bin/shortcuts
@@ -31,7 +31,7 @@ printf "\" vim: filetype=vim\\n" >"$vifm_shortcuts"
[ -f "$HOME/.config/yazi/keymap-default.toml" ] && cp "$HOME/.config/yazi/keymap-default.toml" "$yazi_shortcuts"
# Format the `directories` file in the correct syntax and sent it to all three configs.
-eval "echo \"$(cat "$bmdirs")\"" |
+eval "echo \"$(/usr/bin/cat "$bmdirs")\"" |
awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
printf(\"%s=\42cd %s && ls -A\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ;
printf(\"[ -n \42%s\42 ] && export %s=\42%s\42 \n\",\$1,\$1,\$2) >> \"$shell_env_shortcuts\" ;
@@ -52,7 +52,7 @@ eval "echo \"$(cat "$bmdirs")\"" |
printf(\"\\t{ on = [ %s ], run = \\\"cd %s\\\", desc = \\\"Go to %s\\\" },\\n\",key_array,\$2,desc_path) >> \"$yazi_shortcuts_tmp\"}"
# Format the `files` file in the correct syntax and sent it to both configs.
-eval "echo \"$(cat "$bmfiles")\"" |
+eval "echo \"$(/usr/bin/cat "$bmfiles")\"" |
awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
printf(\"%s=\42\$EDITOR %s\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ;
printf(\"[ -n \42%s\42 ] && export %s=\42%s\42 \n\",\$1,\$1,\$2) >> \"$shell_env_shortcuts\" ;
@@ -103,7 +103,7 @@ printf "# vim: filetype=sh\\nalias " | sudo tee "$root_shell_shortcuts" 2>/dev/n
sudo mkdir -p /root/.config/shell/ /root/.config/lf/ /root/.config/vim/
sudo touch "$root_shell_shortcuts" "$root_zsh_named_dirs" "$root_lf_shortcuts" "$root_vim_shortcuts"
-eval "echo \"$(cat "$bmdirs")\"" |
+eval "echo \"$(/usr/bin/cat "$bmdirs")\"" |
sudo awk "!/^\s*#/ && !/^\s*\$/ && /cache|config($|\/bash|\/lf|\/shell|\/vim)|local\/(bin|share|state)$/ {gsub(\"\\\s*#.*$\",\"\"); gsub(\"home/$USER\", \"root\");
printf(\",%s=\42cd %s && ls -A\42 \\\\\n\",\$1,\$2) >> \"$root_shell_shortcuts\" ;
printf(\"hash -d ,%s=%s \n\",\$1,\$2) >> \"$root_zsh_named_dirs\" ;
@@ -111,7 +111,7 @@ eval "echo \"$(cat "$bmdirs")\"" |
printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$root_vim_shortcuts\" ;
printf(\"nmap <localleader><localleader>%s :Explore %s<cr>\n\",\$1,\$2) >> \"$root_vim_shortcuts\"}"
-eval "echo \"$(cat "$bmfiles")\"" |
+eval "echo \"$(/usr/bin/cat "$bmfiles")\"" |
sudo awk "!/^\s*#/ && !/^\s*\$/ && /config\/(bash|lf|vim)\/.*rc |inputrc|\$EDITOR / {gsub(\"\\\s*#.*$\",\"\"); gsub(\"home/$USER\", \"root\");
printf(\",%s=\42\$EDITOR %s\42 \\\\\n\",\$1,\$2) >> \"$root_shell_shortcuts\" ;
printf(\"hash -d ,%s=%s \n\",\$1,\$2) >> \"$root_zsh_named_dirs\" ;