Skip to content

Instantly share code, notes, and snippets.

View dguest's full-sized avatar

Daniel Hay Guest dguest

View GitHub Profile
@dguest
dguest / _h5ls.sh
Last active March 21, 2018 19:18
Autocomplete for h5ls
# bash completion function for hdf 'h5ls'
_h5ls()
{
local cur prev opts WORDS end
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="-h --help -d --data -r --recursive -S --simple"
local TAIL_WD=$(( ${#COMP_WORDS[@]} - ${COMP_CWORD} - 1 ))