Commit 2b1f77b2 authored by Valentin Samir's avatar Valentin Samir

On autocomplète --edit que si ont peut éditer les fichiers.

parent 3b1bf0e7
......@@ -77,9 +77,18 @@ server=$_cranspasswords_server
return 0
fi
if [[ "$last" = "--edit" ]]; then
if [ ! -f "${pass_dir}${server}-w" ]; then
echo "`cranspasswords --server $server -l | grep "+" | awk '{print $2}'`" > "${pass_dir}${server}-w"
fi
pass_list="`cat "${pass_dir}${server}-w"`"
COMPREPLY=( $(compgen -W "$pass_list" -- $cur ) )
return 0
fi
if true; then
if [ ! -f "${pass_dir}$server" ]; then
echo "`cranspasswords --server $server -l | grep "+" | awk '{print $2}'`" > "${pass_dir}$server"
echo "`cranspasswords --server $server -l | grep "\( +\| -\)" | awk '{print $2}'`" > "${pass_dir}$server"
fi
pass_list="`cat "${pass_dir}$server"`"
COMPREPLY=( $(compgen -W "$pass_list" -- $cur ) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment