1
Fork 0
dots/zsh/zsh-functions

25 lines
520 B
Text
Raw Normal View History

2023-08-21 09:56:16 +00:00
function cc() python -c "from math import *; print($*)"
function mkcd() mkdir -p -- $1 && cd -- $1
2023-08-22 23:42:42 +00:00
function save-ssh-key() {
mv "$1" "$HOME/.ssh/${1}_${2}"
mv "$1.pub" "$HOME/.ssh/${1}_${2}.pub"
}
2023-08-24 23:03:02 +00:00
function eik() {
kitten edit-in-kitty "$1"
}
2023-08-30 02:00:57 +00:00
function find-directory() {
FOLDER=$(fd -t d --hidden | fzf --height "50%" --reverse)
if [ -n "$FOLDER" ]; then
2023-11-10 10:58:01 +00:00
BUFFER="cd $FOLDER; l"
2023-08-30 02:00:57 +00:00
zle .accept-line
else
zle reset-prompt
fi
}
zle -N find-directory
2023-08-21 09:56:16 +00:00
# vim: filetype=zsh