aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2021-12-05 01:57:22 +0900
committernsfisis <nsfisis@gmail.com>2021-12-05 01:57:22 +0900
commit2bacb56c9ff611694996575cd194853e1449c12b (patch)
tree47aa81f9503448e4bb87e8a4563dece39e73510a /scripts
parent37390d4411d09b54cbd8bf53bede94e8e4caeb02 (diff)
downloaddotfiles-2bacb56c9ff611694996575cd194853e1449c12b.tar.gz
dotfiles-2bacb56c9ff611694996575cd194853e1449c12b.tar.zst
dotfiles-2bacb56c9ff611694996575cd194853e1449c12b.zip
update scripts/nvim-startup.sh
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/nvim-startup.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/nvim-startup.sh b/scripts/nvim-startup.sh
index 8a78253..1efc93e 100755
--- a/scripts/nvim-startup.sh
+++ b/scripts/nvim-startup.sh
@@ -1,5 +1,11 @@
#!/bin/bash
+if [[ "$1" == '-s' ]]; then
+ _filter='sort -nr -k2'
+else
+ _filter='cat'
+fi
+
log="$(mktemp)"
nvim --startuptime "$log" +q
-sort -nr -k2 "$log" | head -n 30 > ./nvim-startup.log
+$_filter "$log" > ./nvim-startup.log