Remove unneded function's.
This commit is contained in:
parent
8aeecf0c42
commit
e430e873a3
@ -1,31 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Cd into a directory using fzf
|
|
||||||
fcd () {
|
|
||||||
dir=$(fd -a --type d --hidden --exclude ".git|.github" --color=never | fzf --prompt "Choose directory: ")
|
|
||||||
[ -z $dir ] && return 1
|
|
||||||
cd $dir
|
|
||||||
}
|
|
||||||
|
|
||||||
# Cd into specific repo
|
|
||||||
fr () {
|
|
||||||
dir=$(fd . ~/repos --maxdepth 1 -a --type d --hidden --exclude ".git|.github" --color=never | fzf --prompt "Choose directory: ")
|
|
||||||
[ -z $dir ] && return 1
|
|
||||||
cd $dir
|
|
||||||
}
|
|
||||||
|
|
||||||
# Remove choosed stuff
|
|
||||||
frm () {
|
|
||||||
remove=$(fd --hidden --maxdepth 1 --color=never | fzf -m --prompt "Choose to delete: ")
|
|
||||||
[ -z $remove ] && return 1
|
|
||||||
rm -rf $(printf '%s' $remove)
|
|
||||||
}
|
|
||||||
|
|
||||||
# Quicly choose stuff to add using fzf
|
|
||||||
fga () {
|
|
||||||
git add $(git status -s | awk '{ print $2 }' | fzf -m)
|
|
||||||
}
|
|
||||||
|
|
||||||
# Open a script in path with vim quicly
|
# Open a script in path with vim quicly
|
||||||
vish () {
|
vish () {
|
||||||
nvim $(which $1)
|
nvim $(which $1)
|
||||||
@ -67,11 +40,6 @@ vf(){
|
|||||||
--preview 'bat --color=always --style=plain --pager=never {}' | xargs -r $EDITOR
|
--preview 'bat --color=always --style=plain --pager=never {}' | xargs -r $EDITOR
|
||||||
}
|
}
|
||||||
|
|
||||||
# history search
|
|
||||||
h() {
|
|
||||||
print -z $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac | sed -E 's/ *[0-9]*\*? *//' | sed -E 's/\\/\\\\/g')
|
|
||||||
}
|
|
||||||
|
|
||||||
# Copy current working directory
|
# Copy current working directory
|
||||||
cpdir() {
|
cpdir() {
|
||||||
pwd | tr -d "\r\n" | xclip -sel c
|
pwd | tr -d "\r\n" | xclip -sel c
|
||||||
@ -82,11 +50,6 @@ cf() {
|
|||||||
cat $1 | xclip -sel c
|
cat $1 | xclip -sel c
|
||||||
}
|
}
|
||||||
|
|
||||||
# Open a bookmark from buku in browser
|
|
||||||
fb() {
|
|
||||||
buku --nostdin -p -f5 | fzf | cut -f1 | xargs -r buku --nostdin -o
|
|
||||||
}
|
|
||||||
|
|
||||||
# Extract all archive in current path and remove the archive
|
# Extract all archive in current path and remove the archive
|
||||||
erm() {
|
erm() {
|
||||||
for file in *.zip; do
|
for file in *.zip; do
|
||||||
|
Loading…
Reference in New Issue
Block a user