Skip to content

Commit

Permalink
use xsel
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghao7 committed Apr 10, 2019
1 parent 3bd021e commit 34f80c8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@ function sel_dir() {
fi
done

echo "cd $sel_dir"
which xsel > /dev/null
if [ $? = 0 ]; then
echo "cd $sel_dir" | xsel -i -b
echo "'cd $sel_dir' now in clipboard, ctrl+v to paste it."
else
echo "xsel not installed"
fi
}

function rem_all_dirs() {
Expand Down

0 comments on commit 34f80c8

Please sign in to comment.