diff options
Diffstat (limited to 'user/settings/fish')
-rw-r--r-- | user/settings/fish/functions/dired.fish | 2 | ||||
-rw-r--r-- | user/settings/fish/functions/magit.fish | 2 | ||||
-rw-r--r-- | user/settings/fish/functions/newest.fish | 10 | ||||
-rw-r--r-- | user/settings/fish/functions/oldest.fish | 10 |
4 files changed, 14 insertions, 10 deletions
diff --git a/user/settings/fish/functions/dired.fish b/user/settings/fish/functions/dired.fish index 97174b35..a59ffac2 100644 --- a/user/settings/fish/functions/dired.fish +++ b/user/settings/fish/functions/dired.fish @@ -4,5 +4,5 @@ function dired else set --function repo $pwd end - emacsclient -e "(magit-status \"$argv[1]\")" + emacsclient --suppress-output --eval "(dired \"$argv[1]\")" end diff --git a/user/settings/fish/functions/magit.fish b/user/settings/fish/functions/magit.fish index 048fd42f..96c90096 100644 --- a/user/settings/fish/functions/magit.fish +++ b/user/settings/fish/functions/magit.fish @@ -4,5 +4,5 @@ function magit else set --function repo $pwd end - emacsclient -e "(magit-status \"$argv[1]\")" + emacsclient --suppress-output --eval "(magit-status \"$argv[1]\")" end diff --git a/user/settings/fish/functions/newest.fish b/user/settings/fish/functions/newest.fish index 73e26dcc..3f2fa66f 100644 --- a/user/settings/fish/functions/newest.fish +++ b/user/settings/fish/functions/newest.fish @@ -4,9 +4,11 @@ function newest return 1 end for arg in $argv - fd --hidden --print0 --max-depth 1 . $arg | - bfs -files0-from - \( -name .git -prune \) -o \( -printf '%TY%Tm%Td%TR %TF %h/%f\n' \) | - sort --reverse --key 1n,1 | head --lines 1 | - cut -d ' ' -f 2,3 + if test -d $arg + fd --hidden --print0 --max-depth 1 . $arg | + bfs -files0-from - \( -name .git -prune \) -o \( -printf '%TY%Tm%Td%TH%TM %TF %h/%f\n' \) | + sort --key 1nr,1 | head --lines 1 | + cut -d ' ' -f 2,3 + end end end diff --git a/user/settings/fish/functions/oldest.fish b/user/settings/fish/functions/oldest.fish index 66aad720..140d74cc 100644 --- a/user/settings/fish/functions/oldest.fish +++ b/user/settings/fish/functions/oldest.fish @@ -4,9 +4,11 @@ function oldest return 1 end for arg in $argv - fd --hidden --print0 --max-depth 1 . $arg | - bfs -files0-from - \( -name .git -prune \) -o \( -printf '%TY%Tm%Td%TR %TF %h/%f\n' \) | - sort --key 1n,1 | head --lines 1 | - cut -d ' ' -f 2,3 + if test -d $arg + fd --hidden --print0 --max-depth 1 . $arg | + bfs -files0-from - \( -name .git -prune \) -o \( -printf '%TY%Tm%Td%TH%TM %TF %h/%f\n' \) | + sort --key 1n,1 | head --lines 1 | + cut -d ' ' -f 2,3 + end end end |