remember last save directory
This commit is contained in:
parent
b1e3323c63
commit
b4f5a1515f
|
@ -1,7 +1,16 @@
|
|||
#!/bin/sh
|
||||
|
||||
DIRFILE="$HOME/.surf/lastsavedir"
|
||||
|
||||
lastdir=$(cat "$DIRFILE")
|
||||
if [ -n "$lastdir" ]; then
|
||||
cd "$lastdir"
|
||||
fi
|
||||
|
||||
filename=$(basename -s ".html" "$1")
|
||||
file=$(zenity --file-selection --save --filename="$filename.html")
|
||||
if [ -n "$file" ]; then
|
||||
cat > "$file"
|
||||
dir=$(dirname "$file")
|
||||
echo "$dir" > "$DIRFILE"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user