files: fish: Fix behavior of some custom fish functions
parent
602b1ad16c
commit
fc3f29f227
|
@ -38,10 +38,20 @@ end
|
|||
|
||||
function bang-bang-k
|
||||
set -l k (string replace '!!:' '' $argv[1])
|
||||
set -l arr (string replace -ra ' ' '\n' $history[1])
|
||||
set -l arr (string replace -ra '([^\\\ ])( |\n)+' '$1\n' $history[1])
|
||||
echo $arr[$k]
|
||||
end
|
||||
|
||||
function bang-dollar
|
||||
set -l arr (string replace -ra '([^\\\ ])( |\n)+' '$1\n' $history[1])
|
||||
echo $arr[-1]
|
||||
end
|
||||
|
||||
function bang-star
|
||||
set -l arr (string replace -ra '([^\\\ ])( |\n)+' '$1\n' $history[1])
|
||||
echo $arr[..-2]
|
||||
end
|
||||
|
||||
function edit-home
|
||||
echo "~/projects/code/scm/radix/ && $EDITOR home-environments/$(whoami).scm"
|
||||
end
|
||||
|
@ -49,11 +59,3 @@ end
|
|||
function edit-system
|
||||
echo "~/projects/code/scm/radix/ && $EDITOR operating-systems/$(hostname).scm"
|
||||
end
|
||||
|
||||
function bang-dollar
|
||||
string replace -ra '.* ' '' "$history[1]"
|
||||
end
|
||||
|
||||
function bang-star
|
||||
string replace -ra ' [^ ]+$' '' "$history[1]"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue