File: ed-tkdesk

package info (click to toggle)
tkdesk 2.0-12
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 6,596 kB
  • sloc: tcl: 20,764; ansic: 16,262; sh: 359; makefile: 233
file content (22 lines) | stat: -rwxr-xr-x 514 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
#
# Usage: ed-tkdesk [-wait] [+linenum] [file ...]
# Opens a new editor window, and loads files if any are given.

EDITCMD=dsk_edit_wait

if [ $# -gt 0 ]; then
  FILES=
  for f in $@; do
    if [ "$f" = "-q" ]; then
      EDITCMD=dsk_edit
    elif [ -z "`echo $f | egrep '^[/~]|^\+[1-90]+$'`" ]; then
      FILES="$FILES `pwd`/$f"
    else
      FILES="$FILES $f"
    fi
  done
  tkdeskclient "cd `pwd`; $EDITCMD `echo $FILES`; cd" >/dev/null
else
  tkdeskclient "cd `pwd`; $EDITCMD \"New File\"; cd"
fi