26 lines
547 B
Bash
26 lines
547 B
Bash
function cc() python -c "from math import *; print($*)"
|
|
alias cc='noglob cc'
|
|
|
|
function save-ssh-key() {
|
|
mkdir -p "$HOME/.ssh"
|
|
chmod 700 "$HOME/.ssh"
|
|
|
|
mv "$1" "$HOME/.ssh/${1}_${2}"
|
|
|
|
if [ -e "$1.pub" ]; then
|
|
mv -n "$1.pub" "$HOME/.ssh/${1}_${2}.pub"
|
|
fi
|
|
}
|
|
|
|
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
|