1 | #!/bin/bash | 1 | #!/bin/bash |
---|---|---|---|
2 | 2 | ||
3 | export PROMPT="$1" | ||
4 | |||
3 | exec 5>&1 | 5 | exec 5>&1 |
4 | rxvt -geometry 120x2 -e bash -c 'read -p "'$1'": " -e; printf "%s" "$REPLY" >&5' | 6 | urxvt -geometry 120x16 -transient-for "$2" +sb -e bash -c ' |
7 | echo "gtk bash file chooser" | ||
8 | echo "cwd: $PWD" | ||
9 | read -p "$PROMPT" -e | ||
10 | REPLY=$(eval echo "$REPLY") | ||
11 | case "$REPLY" in | ||
12 | /* ) printf "%s" "$REPLY" >&5 ;; | ||
13 | * ) printf "%s/%s" "$PWD" "$REPLY" >&5 ;; | ||
14 | esac | ||
15 | ' | ||
5 | 16 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |