diff options
| author | nsfisis <nsfisis@gmail.com> | 2021-12-05 01:57:22 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2021-12-05 01:57:22 +0900 |
| commit | 2bacb56c9ff611694996575cd194853e1449c12b (patch) | |
| tree | 47aa81f9503448e4bb87e8a4563dece39e73510a | |
| parent | 37390d4411d09b54cbd8bf53bede94e8e4caeb02 (diff) | |
| download | dotfiles-2bacb56c9ff611694996575cd194853e1449c12b.tar.gz dotfiles-2bacb56c9ff611694996575cd194853e1449c12b.tar.zst dotfiles-2bacb56c9ff611694996575cd194853e1449c12b.zip | |
update scripts/nvim-startup.sh
| -rwxr-xr-x | scripts/nvim-startup.sh | 8 |
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 |
