diff options
Diffstat (limited to 'scripts')
| -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 |
