1
0
Fork 0

change bookmarks

This commit is contained in:
Luca Bilke 2024-01-04 12:45:23 +01:00
parent 2a529dbe18
commit 7b4bbb15ba
5 changed files with 3 additions and 20 deletions

View File

@ -5,6 +5,7 @@ cf $XDG_CONFIG_HOME
dt $XDG_DATA_HOME
st $XDG_STATE_HOME
sc $HOME/.local/bin
sv $HOME/.local/sv
mn /mnt
co $XDG_DOCUMENTS_DIR/code
dl $XDG_DOWNLOAD_DIR

View File

@ -4,6 +4,7 @@ map gcf cd "/home/luca/.config"
map gdt cd "/home/luca/.local/share"
map gst cd "/home/luca/.local/state"
map gsc cd "/home/luca/.local/bin"
map gsv cd "/home/luca/.local/sv"
map gmn cd "/mnt"
map gco cd "/home/luca/Documents/code"
map gdl cd "/home/luca/Downloads"

View File

@ -4,6 +4,7 @@ hash -d cf=/home/luca/.config
hash -d dt=/home/luca/.local/share
hash -d st=/home/luca/.local/state
hash -d sc=/home/luca/.local/bin
hash -d sv=/home/luca/.local/sv
hash -d mn=/mnt
hash -d co=/home/luca/Documents/code
hash -d dl=/home/luca/Downloads

View File

@ -1,18 +0,0 @@
# vim: filetype=sh
alias h="cd /home/luca" \
ch="cd /home/luca/.cache" \
cf="cd /home/luca/.config" \
dt="cd /home/luca/.local/share" \
st="cd /home/luca/.local/state" \
sc="cd /home/luca/.local/bin" \
mn="cd /mnt" \
co="cd /home/luca/Documents/code" \
dl="cd /home/luca/Downloads" \
dm="cd /home/luca/Documents" \
dk="cd /home/luca/Desktop" \
ms="cd /home/luca/Music" \
pc="cd /home/luca/Pictures" \
vd="cd /home/luca/Videos" \
dot="cd /home/luca/.local/share/stow/dots" \
bf="$EDITOR /home/luca/.config/bookmarks/files" \
bd="$EDITOR /home/luca/.config/bookmarks/directories" \

View File

@ -15,12 +15,10 @@ rm -f "$shell_shortcuts" "$lf_files" "$lf_dirs" "$lf_shortcuts" "$zsh_named_dirs
printf "# vim: filetype=sh\\nalias " >"$shell_shortcuts"
eval "echo \"$(cat "$bmdirs")\"" | awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
printf(\"%s=\42cd %s\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ;
printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ;
printf(\"map g%s cd \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" ;
printf(\"%s\n\",\$2) >> \"$lf_dirs\" }"
eval "echo \"$(cat "$bmfiles")\"" | awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
printf(\"%s=\42\$EDITOR %s\42 \\\\\n\",\$1,\$2) >> \"$shell_shortcuts\" ;
printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ;
printf(\"%s\n\",\$2) >> \"$lf_files\" }"