adjust papis alias
This commit is contained in:
parent
cbb8459622
commit
d365d1ca4f
1 changed files with 4 additions and 29 deletions
|
|
@ -8,8 +8,7 @@
|
|||
[settings]
|
||||
default-library = main
|
||||
editor = nvim
|
||||
opentool = ${if pkgs.stdenv.isDarwin then "open" else "xdg-open"}
|
||||
file-browser = ${if pkgs.stdenv.isDarwin then "open" else "xdg-open"}
|
||||
opentool = ${if pkgs.stdenv.isDarwin then "open -a Preview" else "evince"}
|
||||
|
||||
# Document management
|
||||
ref-format = {doc[author]}{doc[year]}
|
||||
|
|
@ -95,30 +94,6 @@
|
|||
|
||||
# Shell functions for papis workflow
|
||||
programs.zsh.initContent = ''
|
||||
# Papis finder function - open document directory with query support
|
||||
${lib.optionalString pkgs.stdenv.isDarwin ''
|
||||
pafinder() {
|
||||
local result=$(papis list "$@" | head -1)
|
||||
if [ -n "$result" ]; then
|
||||
open -R "$result"
|
||||
else
|
||||
echo "No documents found"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
''}
|
||||
${lib.optionalString (!pkgs.stdenv.isDarwin) ''
|
||||
pafinder() {
|
||||
local result=$(papis list "$@" | head -1)
|
||||
if [ -n "$result" ]; then
|
||||
xdg-open "$(dirname "$result")"
|
||||
else
|
||||
echo "No documents found"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
''}
|
||||
|
||||
# Papis add file function - add file to existing document with proper parameter handling
|
||||
pafile() {
|
||||
if [ $# -lt 1 ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue