diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-03-13 14:13:21 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-03-13 14:13:21 +0900 |
| commit | d3765f6e77a47efa92b3599b42a7ea6f59214719 (patch) | |
| tree | 348970dd10d0eaf3954bd9f9970b4c88bbf90f39 /ar/.local/bin | |
| parent | 4270e80e19e1f179cf816f74f12f771eb6a0672e (diff) | |
modified bin/shortcuts
Diffstat (limited to 'ar/.local/bin')
| -rwxr-xr-x | ar/.local/bin/shortcuts | 8 |
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\" ; |
