mirror of
https://github.com/ryanccn/flake.git
synced 2025-12-06 08:10:43 +01:00
feat(fish): add where function
This commit is contained in:
parent
dbce5bf0d8
commit
2d758cb766
1 changed files with 9 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ in {
|
|||
programs.fish = {
|
||||
enable = true;
|
||||
inherit shellAbbrs shellAliases;
|
||||
|
||||
functions = {
|
||||
take = ''
|
||||
set dir $argv[1]
|
||||
|
|
@ -16,6 +17,14 @@ in {
|
|||
mkdir "$dir"
|
||||
cd "$dir"
|
||||
'';
|
||||
where = ''
|
||||
set name $argv[1]
|
||||
for p in $PATH
|
||||
if test -e "$p/$name"
|
||||
echo "$p/$name"
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue