Fixes fish config
This commit is contained in:
parent
6c1bc60f85
commit
a83f94a1b7
1 changed files with 80 additions and 70 deletions
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
functions = {
|
||||
cdr = ''
|
||||
function cdr
|
||||
set folder (begin
|
||||
fd . ~/dev/ride/apps/backend/edge-services -t d -d 1;
|
||||
fd . ~/dev/ride/apps/backend/backend-services -t d -d 1;
|
||||
|
|
@ -16,8 +17,10 @@
|
|||
set service (basename $folder)
|
||||
|
||||
cd $folder
|
||||
end
|
||||
'';
|
||||
rr = ''
|
||||
function rr
|
||||
set folder (begin
|
||||
fd . ~/dev/ride/apps/backend/edge-services -t d -d 1;
|
||||
fd . ~/dev/ride/apps/backend/backend-services -t d -d 1;
|
||||
|
|
@ -47,8 +50,10 @@
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
'';
|
||||
ff = ''
|
||||
function ff
|
||||
set RG_PREFIX "rg --column --line-number --no-heading --color=always --smart-case "
|
||||
set INITIAL_QUERY "$argv"
|
||||
fzf --ansi --disabled --query "$INITIAL_QUERY" \
|
||||
|
|
@ -58,15 +63,19 @@
|
|||
--preview 'bat --color=always {1} --highlight-line {2}' \
|
||||
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3' \
|
||||
--bind 'enter:become(nvim {1} +{2})'
|
||||
end
|
||||
'';
|
||||
envsource = ''
|
||||
function envsource
|
||||
for line in (cat $argv | grep -v '^#')
|
||||
set item (string split -m 1 '=' $line)
|
||||
set -gx $item[1] $item[2]
|
||||
end
|
||||
end
|
||||
'';
|
||||
fish_greeting = "fortune -a";
|
||||
resize_images = ''
|
||||
function resize_images
|
||||
# Resize all JPG images in the current directory and its subdirectories
|
||||
# Usage: resize_images [percentage]
|
||||
# Example: resize_images 20 - resizes all images to 20% of original size
|
||||
|
|
@ -86,6 +95,7 @@
|
|||
echo "New size: $new_size bytes"
|
||||
echo "---"
|
||||
end
|
||||
end
|
||||
'';
|
||||
localip = "ifconfig | grep \"inet \" | grep -v 127.0.0.1 | awk '{print $2}' | head -n 1";
|
||||
publicip = "curl -4 ifconfig.me";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue