diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-01-08 02:27:26 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-01-08 02:27:26 +0100 |
| commit | 75b47fca281ed5ba0e8ba63bb6a75dde904d5171 (patch) | |
| tree | d80728ee927f3a5784c26acddf32dcda1232cfe3 | |
| parent | 9b31a4207ac2aa8823528638e7e2ec078d8e7f7f (diff) | |
| download | dotfiles-75b47fca281ed5ba0e8ba63bb6a75dde904d5171.tar.gz dotfiles-75b47fca281ed5ba0e8ba63bb6a75dde904d5171.tar.bz2 dotfiles-75b47fca281ed5ba0e8ba63bb6a75dde904d5171.zip | |
Added clipboard support for project-open
| -rwxr-xr-x | bin/project-open | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/project-open b/bin/project-open index 955d31d..adb27a4 100755 --- a/bin/project-open +++ b/bin/project-open @@ -34,12 +34,13 @@ else "clone") while [ -z "$remote_choice" ] do - remote_choice=$(printf 'github.com\ncacharle.xyz\nother' | dmenu -p "Remote location") + remote_choice=$(printf 'github.com\ncacharle.xyz\nclipboard\nother' | dmenu -p "Remote location") done case "$remote_choice" in - "github.com") prefix='git@github.com:cacharle/' ;; - "cacharle.xyz") prefix='git@cacharle.xyz:/srv/git/' ;; - "other") ;; + github.com) prefix='git@github.com:cacharle/' ;; + cacharle.xyz) prefix='git@cacharle.xyz:/srv/git/' ;; + clipboard) dest="$(xclip -selection clipboard -o)" ;; + other) ;; esac url="$prefix$(echo "$dest" | dmenu -p "Enter repository url: $prefix")" st -e /bin/sh -c "git clone --recursive '$url' '$dest_path' && cd '$dest_path' && exec $SHELL" || |
