1
Fork 0
dots/zsh/zsh-functions
2023-11-10 15:58:01 +05:00

24 lines
520 B
Bash

function cc() python -c "from math import *; print($*)"
function mkcd() mkdir -p -- $1 && cd -- $1
function save-ssh-key() {
mv "$1" "$HOME/.ssh/${1}_${2}"
mv "$1.pub" "$HOME/.ssh/${1}_${2}.pub"
}
function eik() {
kitten edit-in-kitty "$1"
}
function find-directory() {
FOLDER=$(fd -t d --hidden | fzf --height "50%" --reverse)
if [ -n "$FOLDER" ]; then
BUFFER="cd $FOLDER; l"
zle .accept-line
else
zle reset-prompt
fi
}
zle -N find-directory
# vim: filetype=zsh