Register-ArgumentCompleter -Native -CommandName az -ScriptBlock {
param($commandName, $wordToComplete, $cursorPosition)
$completion_file = New-TemporaryFile
$env:ARGCOMPLETE_USE_TEMPFILES = 1
$env:_ARGCOMPLETE_STDOUT_FILENAME = $completion_file
$env:COMP_LINE = $wordToComplete
$env:COMP_POINT = $cursorPosition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import argparse | |
| import heapq | |
| def parse_args(): | |
| parser = argparse.ArgumentParser(description="Analyze bashstart log for speed.") | |
| parser.add_argument('filename', help="often /tmp/bashstart.<PID>.log") | |
| parser.add_argument('-n', default=20, help="number of results to show") | |
| return parser.parse_args() |