config: fix aliases, notably custom cd

This commit is contained in:
xerus2000 2021-04-12 19:22:58 +02:00
parent 1a9fa40da7
commit 8273f718a1
3 changed files with 5 additions and 3 deletions

View File

@ -172,6 +172,7 @@
"\\" 'org-ctrl-c-ctrl-c "\\" 'org-ctrl-c-ctrl-c
:localleader :localleader
"j" 'org-insert-heading "j" 'org-insert-heading
"k" 'org-latex-export-to-pdf
"t" 'org-todo-or-insert "t" 'org-todo-or-insert
"e" 'org-export-dispatch-custom-date "e" 'org-export-dispatch-custom-date
"E" 'org-export-repeat "E" 'org-export-repeat

View File

@ -34,7 +34,7 @@
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra ;;hydra
indent-guides ; highlighted indent columns indent-guides ; highlighted indent columns
ligatures ; ligatures and symbols to make your code pretty again ;;ligatures ; ligatures and symbols to make your code pretty again
minimap ; show a map of the code on the side minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API modeline ; snazzy, Atom-inspired modeline, plus API
nav-flash ; blink cursor line after big motions nav-flash ; blink cursor line after big motions

View File

@ -88,7 +88,8 @@ edbin() {
alias l="ls -l --almost-all --human-readable --group-directories-first --file-type" alias l="ls -l --almost-all --human-readable --group-directories-first --file-type"
cd() { cd() {
test ! -e "$1" && test $# -eq 1 && cd $DATA/$1* && return test ! -d "$1" && test $# -eq 1 && dir=$(find "$DATA" -maxdepth 2 -type d -name "$1*" | head -1) &&
test -n "$dir" && cd "$dir" && return
builtin cd $1 && builtin cd $1 &&
command ls --file-type --group-directories-first --color=always --format=vertical -w $COLUMNS | head -3 command ls --file-type --group-directories-first --color=always --format=vertical -w $COLUMNS | head -3
} }
@ -130,7 +131,7 @@ browse-unsafe() {
sudo chattr -i /etc/resolv.conf && sudo chattr -i /etc/resolv.conf &&
sudo mv /etc/resolv.conf /etc/resolv.conf.bak && sudo mv /etc/resolv.conf /etc/resolv.conf.bak &&
sudo systemctl enable --now systemd-resolved && sudo systemctl enable --now systemd-resolved &&
sleep 1 sleep 100
browse-safe browse-safe
} }