Commit 3146e716 authored by pgd's avatar pgd
Browse files

implement customizing separator between objects

By setting options of separator, it is possible to modify the value of
separator

Related to: #173
parent 271a678a
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -32,6 +32,11 @@ export const command = new Command()
    conflicts: ["raw", "compact"],
  })
  .option("-u, --user-agent <string>", "The custom User-Agent header value.")
  .option(
    "-s, --separator <separator:string>",
    "Speicfy the separator between adjacent output object.",
    { default: "~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~" },
  )
  .action(async (options, ...urls: string[]) => {
    const spinner = ora({
      text: "Looking up the object...",
@@ -133,7 +138,7 @@ export const command = new Command()
          console.log(object);
        }
        if (i < urls.length - 1) {
          console.log("===================");
          console.error(options.separator);
        }
      } catch (_) {
        spinnerForEachLookup.fail();