fromkey, registerurl: When reading from stdin, allow the filename and url, respectively, to contain whitespace.
This commit is contained in:
parent
42281f12d6
commit
279fa44cd0
5 changed files with 8 additions and 6 deletions
|
@ -41,10 +41,10 @@ start _ [] = do
|
|||
start _ _ = error "specify a key and a dest file"
|
||||
|
||||
massAdd :: CommandPerform
|
||||
massAdd = go True =<< map words . lines <$> liftIO getContents
|
||||
massAdd = go True =<< map (separate (== ' ')) . lines <$> liftIO getContents
|
||||
where
|
||||
go status [] = next $ return status
|
||||
go status ([keyname,f]:rest) = do
|
||||
go status ((keyname,f):rest) | not (null keyname) && not (null f) = do
|
||||
let key = fromMaybe (error $ "bad key " ++ keyname) $ file2key keyname
|
||||
ok <- perform' key f
|
||||
let !status' = status && ok
|
||||
|
|
|
@ -34,10 +34,10 @@ start [] = do
|
|||
start _ = error "specify a key and an url"
|
||||
|
||||
massAdd :: CommandPerform
|
||||
massAdd = go True =<< map words . lines <$> liftIO getContents
|
||||
massAdd = go True =<< map (separate (== ' ')) . lines <$> liftIO getContents
|
||||
where
|
||||
go status [] = next $ return status
|
||||
go status ([keyname,u]:rest) = do
|
||||
go status ((keyname,u):rest) | not (null keyname) && not (null u) = do
|
||||
let key = fromMaybe (error $ "bad key " ++ keyname) $ file2key keyname
|
||||
ok <- perform' key u
|
||||
let !status' = status && ok
|
||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -2,6 +2,8 @@ git-annex (5.20150406.2) UNRELEASED; urgency=medium
|
|||
|
||||
* --quiet now suppresses progress displays from eg, rsync.
|
||||
(Second time's the charm..)
|
||||
* fromkey, registerurl: When reading from stdin, allow the
|
||||
filename and url, respectively, to contain whitespace.
|
||||
|
||||
-- Joey Hess <id@joeyh.name> Mon, 06 Apr 2015 20:14:20 -0400
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ in the git repository to link to a specified key.
|
|||
|
||||
If the key and file are not specified on the command line, they are
|
||||
instead read from stdin. Any number of lines can be provided in this
|
||||
mode, each containing a key and filename, sepearated by whitespace.
|
||||
mode, each containing a key and filename, sepearated by a single space.
|
||||
|
||||
# OPTIONS
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ No verification is performed of the url's contents.
|
|||
|
||||
If the key and url are not specified on the command line, they are
|
||||
instead read from stdin. Any number of lines can be provided in this
|
||||
mode, each containing a key and url, separated by whitespace.
|
||||
mode, each containing a key and url, separated by a single space.
|
||||
|
||||
# SEE ALSO
|
||||
|
||||
|
|
Loading…
Reference in a new issue