Update .config/sheldon/plugins.toml
Update .config/zsh/env.zsh Add .config/zsh/files/functions.zsh Remove .config/zsh/files/keybinds.zsh Remove .config/zsh/files/transfer.zsh Update .config/zsh/rc.zsh
This commit is contained in:
parent
27a779ca15
commit
a5c3567d85
6 changed files with 47 additions and 50 deletions
15
dot_config/zsh/files/functions.zsh
Normal file
15
dot_config/zsh/files/functions.zsh
Normal file
|
@ -0,0 +1,15 @@
|
|||
pet_select () {
|
||||
BUFFER=$(pet search --query "$LBUFFER")
|
||||
CURSOR=$#BUFFER
|
||||
zle redisplay
|
||||
}
|
||||
zle -N pet_select
|
||||
bindkey '^l' pet_select
|
||||
|
||||
run_ranger () {
|
||||
echo
|
||||
ranger < $TTY
|
||||
zle redisplay
|
||||
}
|
||||
zle -N run_ranger
|
||||
bindkey '^f' run_ranger
|
|
@ -1,7 +0,0 @@
|
|||
run_ranger () { echo; ranger < $TTY; zle redisplay }
|
||||
zle -N run_ranger
|
||||
bindkey '^f' run_ranger
|
||||
|
||||
pet_select () { BUFFER=$(pet search --query "$LBUFFER"); CURSOR=$#BUFFER; zle redisplay }
|
||||
zle -N pet_select
|
||||
bindkey '^l' pet_select
|
|
@ -1,26 +0,0 @@
|
|||
transfer () {
|
||||
if test $# -eq 0; then
|
||||
echo "No arguments specified.\nUsage:\n transfer <file|directory>\n ... | transfer <file_name>">&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
if tty -s; then
|
||||
file="$1"
|
||||
file_name=$(basename "$file")
|
||||
|
||||
if test ! -e "$file"; then
|
||||
echo "$file: No such file or directory">&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
if test -d "$file"; then
|
||||
file_name="$file_name.zip"
|
||||
(cd "$file" && zip -r -q - .) | curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null
|
||||
else
|
||||
cat "$file" | curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null
|
||||
fi
|
||||
else
|
||||
file_name=$1
|
||||
curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null
|
||||
fi
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue