2024-03-08 14:32:05 +00:00
|
|
|
function xdg-user-directory
|
|
|
|
eval (string join '' 'echo $XDG_' \
|
|
|
|
(string replace '@' '' (string upper $argv[1])) \
|
|
|
|
'_DIR')
|
|
|
|
end
|
|
|
|
|
|
|
|
function bang-bang-k
|
|
|
|
set -l k (string replace '!!:' '' $argv[1])
|
|
|
|
set -l arr (string replace -ra '([^\\\ ])( |\n)+' '$1\n' $history[1])
|
|
|
|
echo $arr[$k]
|
|
|
|
end
|
|
|
|
|
|
|
|
function bang-star
|
|
|
|
set -l arr (string replace -ra '([^\\\ ])( |\n)+' '$1\n' $history[1])
|
2024-03-26 20:21:58 +00:00
|
|
|
string replace '!*' "$arr[..-2]" $argv[1]
|
2024-03-08 14:32:05 +00:00
|
|
|
end
|