parseUpdate :: Parser Command
parseUpdate =
  Update
  <$> optional parseUsername
  <*> optional parseLocation
  <*> optional parseNotes
  <*> optional parseUpdateUsername
  <*> optional ((\x -> case x of
                         True -> passPrompt
                         False -> return $ Password T.empty) <$> switch (long "uP" <> long "updatePass"
                <> help "Update the password with a new password that will be prompted for."))
  <*> optional parseUpdateLocation
  <*> optional parseUpdateNotes
parseUpdate :: Parser Command
parseUpdate =
  Update
  <$> optional parseUsername
  <*> optional parseLocation
  <*> optional parseNotes
  <*> optional parseUpdateUsername
  <*> optional ((\x -> case x of
                         True -> passPrompt
                         False -> return $ Password T.empty) <$> switch (long "uP" <> long "updatePass"
                <> help "Update the password with a new password that will be prompted for."))
  <*> optional parseUpdateLocation
  <*> optional parseUpdateNotes
parseUpdate =
  Update
  <$> optional parseUsername
  <*> optional parseLocation
  <*> optional parseNotes
  <*> optional parseUpdateUsername
  <*> optional ((\x -> case x of
                         True -> passPrompt
                         False -> return $ Password T.empty) <$> switch (long "uP" <> long "updatePass"
                <> help "Update the password with a new password that will be prompted for."))
  <*> optional parseUpdateLocation
  <*> optional parseUpdateNotes