fish: add mkcd and mansearch

This commit is contained in:
Charles Gould 2020-07-26 16:45:27 -04:00
parent 7ebcff5557
commit 32c85f0c3f
2 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,4 @@
function mansearch --description 'Full-text search of man pages'
# -F is used to match literally (no regex)
command rg -z -F $argv (manpath | string split :) -l | command sed -r 's@.*/(.*)\.([0-9]+)(\.gz)?@\1(\2)@g'
end

3
fish/functions/mkcd.fish Normal file
View File

@ -0,0 +1,3 @@
function mkcd --description 'Create and cd into a directory'
mkdir -p $argv[1] && cd $argv[1]
end