mirror of
https://github.com/kristoferssolo/solorice.git
synced 2026-02-04 14:42:04 +00:00
Linted all files
This commit is contained in:
@@ -52,15 +52,15 @@ export KEYTIMEOUT=1
|
||||
|
||||
# Change cursor shape for different vi modes.
|
||||
function zle-keymap-select {
|
||||
case $KEYMAP in
|
||||
vicmd) echo -ne '\e[1 q' ;; # block
|
||||
viins | main) echo -ne '\e[5 q' ;; # beam
|
||||
esac
|
||||
case $KEYMAP in
|
||||
vicmd) echo -ne '\e[1 q' ;; # block
|
||||
viins | main) echo -ne '\e[5 q' ;; # beam
|
||||
esac
|
||||
}
|
||||
zle -N zle-keymap-select
|
||||
zle-line-init() {
|
||||
zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere)
|
||||
echo -ne '\e[5 q'
|
||||
zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere)
|
||||
echo -ne '\e[5 q'
|
||||
}
|
||||
zle -N zle-line-init
|
||||
echo -ne '\e[5 q' # Use beam shape cursor on startup.
|
||||
@@ -68,22 +68,22 @@ preexec() { echo -ne '\e[5 q'; } # Use beam shape cursor for each new prompt.
|
||||
|
||||
# Run exa on directory change
|
||||
function cd() {
|
||||
new_directory="$*"
|
||||
if [ $# -eq 0 ]; then
|
||||
new_directory=${HOME}
|
||||
fi
|
||||
builtin cd "${new_directory}" && exa -a --icons --group-directories-first
|
||||
new_directory="$*"
|
||||
if [ $# -eq 0 ]; then
|
||||
new_directory=${HOME}
|
||||
fi
|
||||
builtin cd "${new_directory}" && exa -a --icons --group-directories-first
|
||||
}
|
||||
|
||||
# Use lf to switch directories and bind it to ctrl-o
|
||||
function lfcd() {
|
||||
tmp="$(mktemp)"
|
||||
lfrun -last-dir-path="$tmp" "$@"
|
||||
if [ -f "$tmp" ]; then
|
||||
dir="$(bat "$tmp")"
|
||||
rm -f "$tmp" >/dev/null
|
||||
[ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
|
||||
fi
|
||||
tmp="$(mktemp)"
|
||||
lfrun -last-dir-path="$tmp" "$@"
|
||||
if [ -f "$tmp" ]; then
|
||||
dir="$(bat "$tmp")"
|
||||
rm -f "$tmp" >/dev/null
|
||||
[ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
|
||||
fi
|
||||
}
|
||||
|
||||
# Navigate words with CTRL+ARROW keys
|
||||
|
||||
Reference in New Issue
Block a user