global/*: use xargs for fzf edit aliases
This commit is contained in:
parent
9004b7014d
commit
2ae0b91986
2 changed files with 4 additions and 4 deletions
|
@ -96,9 +96,9 @@ in
|
||||||
universe.packages = [
|
universe.packages = [
|
||||||
(pkgs.writeScriptBin "editi" ''
|
(pkgs.writeScriptBin "editi" ''
|
||||||
if [[ $# -eq 0 ]] then
|
if [[ $# -eq 0 ]] then
|
||||||
$EDITOR "$(fd -H -t f | fzf --filepath-word --multi)"
|
fd -H -t f | fzf --filepath-word --multi | xargs $EDITOR
|
||||||
else
|
else
|
||||||
$EDITOR "$(fd -H -t f | fzf --filepath-word --multi -1 -q "$*")"
|
fd -H -t f | fzf --filepath-word --multi -1 -q "$*" | xargs $EDITOR
|
||||||
fi
|
fi
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
echo "Not in a git repository"
|
echo "Not in a git repository"
|
||||||
exit 1
|
exit 1
|
||||||
elif [[ $# -eq 0 ]] then
|
elif [[ $# -eq 0 ]] then
|
||||||
$EDITOR "$(git ls-files | fzf --filepath-word --multi)"
|
git ls-files | fzf --filepath-word --multi | xargs $EDITOR
|
||||||
else
|
else
|
||||||
$EDITOR "$(git ls-files | fzf --filepath-word --multi -1 -q "$*")"
|
git ls-files | fzf --filepath-word --multi -1 -q "$*" | xargs $EDITOR
|
||||||
fi
|
fi
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue