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