tests/editing.t @ c92a0241e9c9

Whitespace
author Steve Losh <steve@stevelosh.com>
date Sat, 11 Apr 2020 11:33:49 -0400
parents d76f573934d1
children 831123b0359f
Setup:

  $ alias xt="python $TESTDIR/../t.py --task-dir `pwd` --list test"

Replace a task's text (preserving the ID):

  $ xt Sample.
  $ xt
  a - Sample.
  $ xt -e a New sample.
  $ xt
  d - New sample.
  $ xt 'this | that'
  $ xt
  4 - this | that
  d - New sample.
  $ xt -e 4 'this &| that'
  $ xt
  d1 - this &| that
  df - New sample.

Sed-style substitution:

  $ xt -e a 's/New/Testing/'
  error: the ID "a" does not match any task
  [1]
  $ xt
  d1 - this &| that
  df - New sample.
  $ xt -e 4 '/this &/this /'
  error: the ID "4" does not match any task
  [1]
  $ xt
  d1 - this &| that
  df - New sample.