X-Git-Url: https://git.phdru.name/?p=dotfiles.git;a=blobdiff_plain;f=.bash_completion.d%2Fcgmem_nice;fp=.bash_completion.d%2Fcgmem_nice;h=0b9529432476c658156e6a8e421d4b71c8d8e2eb;hp=0000000000000000000000000000000000000000;hb=d239699bd1163d2ff6459dd79e2fcb276747e131;hpb=91442e415ce67dd496a561848d312dca19675c8e diff --git a/.bash_completion.d/cgmem_nice b/.bash_completion.d/cgmem_nice new file mode 100644 index 0000000..0b95294 --- /dev/null +++ b/.bash_completion.d/cgmem_nice @@ -0,0 +1,12 @@ +_cgmem_nice() +{ + local CUR=${COMP_WORDS[COMP_CWORD]} + + if [ $COMP_CWORD -eq 1 ]; then + COMPREPLY=( $(compgen -W "100 200 300 500 1000 2000 4000" -- $CUR) ) + elif [ $COMP_CWORD -ge 2 ]; then + _command_offset 2 + fi +} + +complete -F _cgmem_nice cgmem_nice