diff --git a/.config/aliasrc b/.config/aliasrc index 69baf9ca..18673b29 100644 --- a/.config/aliasrc +++ b/.config/aliasrc @@ -31,3 +31,4 @@ shdl() { curl -O $(curl -s http://sci-hub.tw/"$@" | grep location.href | grep -o se() { du -a ~/.scripts/* ~/.config/* | awk '{print $2}' | fzf | xargs -r $EDITOR ;} sv() { vcopy "$(du -a ~/.scripts/* ~/.config/* | awk '{print $2}' | fzf)" ;} vf() { fzf | xargs -r -I % $EDITOR % ;} +cd() { builtin cd "$@" && ls -A --group-directories-first ;} diff --git a/.scripts/tools/shortcuts b/.scripts/tools/shortcuts index 3ac0bbd1..da4aa643 100755 --- a/.scripts/tools/shortcuts +++ b/.scripts/tools/shortcuts @@ -13,7 +13,7 @@ printf "# vim: filetype=sh\\nalias " > "$shell_shortcuts" printf "\" vim: filetype=vim\\n" > "$vifm_shortcuts" # Format the `bmdirs` file in the correct syntax and sent it to all three configs. -sed "s/\s*#.*$//;/^\s*$/d" "$HOME/.config/bmdirs" | tee >(awk '{print $1"=\"cd "$2" && ls -a\" \\"}' >> "$shell_shortcuts") \ +sed "s/\s*#.*$//;/^\s*$/d" "$HOME/.config/bmdirs" | tee >(awk '{print $1"=\"cd "$2"\" \\"}' >> "$shell_shortcuts") \ >(awk '{print "abbr", $1, "\"cd " $2 "; and ls -a\""}' >> "$fish_shortcuts") \ >(awk '{print "map g" $1, ":cd", $2 "\nmap t" $1, ":cd", $2 "\nmap M" $1, ":cd", $2 ":mo\nmap Y" $1, ":cd", $2 ":co" }' >> "$vifm_shortcuts") \ >(awk '{print "config.bind(\";"$1"\", \"set downloads.location.directory "$2" ;; hint links download\")"}' >> "$qute_shortcuts") \